Skip to content

Commit f5c303e

Browse files
authored
docs: update python docs with creating topic (#537)
* docs: update python docs with creating topic * docs: update readme with creating topic * docs: update logo
1 parent 2ee2fe3 commit f5c303e

4 files changed

Lines changed: 1913 additions & 1913 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ manylinux2014_aarch64:
5959
manylinux2014_x86_64:
6060
python setup.py bdist_wheel --py-limited-api=cp38 --plat-name manylinux2014_x86_64
6161

62-
PDOC_OPTS=--logo='https://www.fluvio.io/images/assets/fluvio-with-text.svg' --favicon='https://www.fluvio.io/images/favicon.ico'
62+
PDOC_OPTS=--logo='https://www.fluvio.io/img/infinyon-gradient.png' --favicon='https://www.fluvio.io/images/favicon.ico'
6363

6464
docs-serve: venv-pip build-dev
6565
$(PYTHON) -m pdoc fluvio $(PDOC_OPTS)

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,28 @@ This will get the wheel for the os/architecture of the installation system if av
2424

2525
# Example Usage
2626

27+
## Creating a Topic
28+
29+
```python
30+
fluvio_admin = FluvioAdmin.connect()
31+
fluvio_admin.create_topic("a_topic")
32+
```
33+
34+
Or just create a topic with custom settings:
35+
36+
```python
37+
import fluvio
38+
39+
fluvio_admin = FluvioAdmin.connect()
40+
topic_spec = (
41+
TopicSpec.create()
42+
.with_retention_time("1h")
43+
.with_segment_size("10M")
44+
.build()
45+
)
46+
fluvio_admin.create_topic("a_topic", topic_spec)
47+
```
48+
2749
## Producer
2850
```python
2951
from fluvio import Fluvio

0 commit comments

Comments
 (0)