Skip to content

Commit 769825f

Browse files
vgvolegblinkov
andauthored
WIP: Alter topic docs for python sdk (#6180)
Co-authored-by: Ivan Blinkov <ivan@ydb.tech>
1 parent 29f1fa1 commit 769825f

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

ydb/docs/en/core/reference/ydb-sdk/topic.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,14 @@ When you update a topic, you must specify the topic path and the parameters to b
200200

201201
- Python
202202

203-
This feature is under development.
203+
Example of updating a topic's list of supported codecs and minimum number of partitions:
204+
205+
```python
206+
driver.topic_client.create_topic(topic_path,
207+
set_supported_codecs=[ydb.TopicCodec.RAW, ydb.TopicCodec.GZIP], # optional
208+
set_min_active_partitions=3, # optional
209+
)
210+
```
204211

205212
- Java
206213

ydb/docs/ru/core/reference/ydb-sdk/topic.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
[Примеры на GitHub](https://github.com/ydb-platform/ydb-java-examples/tree/master/ydb-cookbook/src/main/java/tech/ydb/examples/topic)
2323

24-
- {Python}
24+
- Python
2525

2626
[Примеры на GitHub](https://github.com/ydb-platform/ydb-python-sdk/tree/main/examples/topic)
2727

@@ -206,7 +206,14 @@
206206

207207
- Python
208208

209-
Функциональность находится в разработке.
209+
Пример изменения списка поддерживаемых кодеков и минимального количества партиций у топика
210+
211+
```python
212+
driver.topic_client.alter_topic(topic_path,
213+
set_supported_codecs=[ydb.TopicCodec.RAW, ydb.TopicCodec.GZIP], # optional
214+
set_min_active_partitions=3, # optional
215+
)
216+
```
210217

211218
- Java
212219

0 commit comments

Comments
 (0)