Skip to content

Commit 20bf7b5

Browse files
Update documentation (#502)
Co-authored-by: daniil-quix <133032822+daniil-quix@users.noreply.github.com>
1 parent efa466b commit 20bf7b5

File tree

3 files changed

+550
-37
lines changed

3 files changed

+550
-37
lines changed

docs/api-reference/application.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ def get_consumer(auto_commit_enable: bool = True) -> Consumer
504504
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L692)
505505

506506
Create and return a pre-configured Consumer instance.
507+
507508
The Consumer is initialized with params passed to Application.
508509

509510
It's useful for consuming data from Kafka outside the standard
@@ -523,6 +524,13 @@ the consumer config when creating the app.
523524
<br>
524525
***Example Snippet:***
525526

527+
528+
529+
<br>
530+
***Arguments:***
531+
532+
- `auto_commit_enable`: Enable or disable auto commit
533+
Default - True
526534
```python
527535
from quixstreams import Application
528536

@@ -550,7 +558,7 @@ with app.get_consumer() as consumer:
550558
def clear_state()
551559
```
552560

553-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L739)
561+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L742)
554562

555563
Clear the state of the application.
556564

@@ -564,7 +572,7 @@ Clear the state of the application.
564572
def add_source(source: BaseSource, topic: Optional[Topic] = None) -> Topic
565573
```
566574

567-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L745)
575+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L748)
568576

569577
Add a source to the application.
570578

@@ -588,7 +596,7 @@ Default: the source default
588596
def run(dataframe: StreamingDataFrame)
589597
```
590598

591-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L764)
599+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L767)
592600

593601
Start processing data from Kafka using provided `StreamingDataFrame`
594602

@@ -620,6 +628,20 @@ app.run(dataframe=df)
620628

621629
- `dataframe`: instance of `StreamingDataFrame`
622630

631+
<a id="quixstreams.app.Application.setup_topics"></a>
632+
633+
<br><br>
634+
635+
#### Application.setup\_topics
636+
637+
```python
638+
def setup_topics()
639+
```
640+
641+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L887)
642+
643+
Validate and create the topics
644+
623645
<a id="quixstreams.app.ApplicationConfig"></a>
624646

625647
### ApplicationConfig
@@ -628,7 +650,7 @@ app.run(dataframe=df)
628650
class ApplicationConfig(BaseSettings)
629651
```
630652

631-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1056)
653+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1063)
632654

633655
Immutable object holding the application configuration
634656

@@ -651,7 +673,7 @@ def settings_customise_sources(
651673
) -> Tuple[PydanticBaseSettingsSource, ...]
652674
```
653675

654-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1090)
676+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1097)
655677

656678
Included to ignore reading/setting values from the environment
657679

@@ -665,7 +687,7 @@ Included to ignore reading/setting values from the environment
665687
def copy(**kwargs) -> Self
666688
```
667689

668-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1103)
690+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1110)
669691

670692
Update the application config and return a copy
671693

0 commit comments

Comments
 (0)