Skip to content

Commit 8231929

Browse files
Update documentation (#855)
Co-authored-by: daniil-quix <133032822+daniil-quix@users.noreply.github.com>
1 parent 08a2e7f commit 8231929

File tree

3 files changed

+116
-132
lines changed

3 files changed

+116
-132
lines changed

docs/api-reference/application.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ instead of the default one.
175175
def Quix(cls, *args, **kwargs)
176176
```
177177

178-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L378)
178+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L374)
179179

180180
RAISES EXCEPTION: DEPRECATED.
181181

@@ -198,7 +198,7 @@ def topic(name: str,
198198
timestamp_extractor: Optional[TimestampExtractor] = None) -> Topic
199199
```
200200

201-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L410)
201+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L406)
202202

203203
Create a topic definition.
204204

@@ -280,7 +280,7 @@ def dataframe(topic: Optional[Topic] = None,
280280
source: Optional[BaseSource] = None) -> StreamingDataFrame
281281
```
282282

283-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L490)
283+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L486)
284284

285285
A simple helper method that generates a `StreamingDataFrame`, which is used
286286

@@ -336,7 +336,7 @@ to be used as an input topic.
336336
def stop(fail: bool = False)
337337
```
338338

339-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L546)
339+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L542)
340340

341341
Stop the internal poll loop and the message processing.
342342

@@ -363,7 +363,7 @@ to unhandled exception, and it shouldn't commit the current checkpoint.
363363
def get_producer() -> Producer
364364
```
365365

366-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L591)
366+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L587)
367367

368368
Create and return a pre-configured Producer instance.
369369
The Producer is initialized with params passed to Application.
@@ -398,7 +398,7 @@ with app.get_producer() as producer:
398398
def get_consumer(auto_commit_enable: bool = True) -> Consumer
399399
```
400400

401-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L645)
401+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L641)
402402

403403
Create and return a pre-configured Consumer instance.
404404

@@ -455,7 +455,7 @@ with app.get_consumer() as consumer:
455455
def clear_state()
456456
```
457457

458-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L694)
458+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L690)
459459

460460
Clear the state of the application.
461461

@@ -469,7 +469,7 @@ Clear the state of the application.
469469
def add_source(source: BaseSource, topic: Optional[Topic] = None) -> Topic
470470
```
471471

472-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L700)
472+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L696)
473473

474474
Add a source to the application.
475475

@@ -498,7 +498,7 @@ def run(dataframe: Optional[StreamingDataFrame] = None,
498498
count: int = 0)
499499
```
500500

501-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L733)
501+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L729)
502502

503503
Start processing data from Kafka using provided `StreamingDataFrame`
504504

@@ -565,7 +565,7 @@ Default = 0 (infinite)
565565
class ApplicationConfig(BaseSettings)
566566
```
567567

568-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1074)
568+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1070)
569569

570570
Immutable object holding the application configuration
571571

@@ -588,7 +588,7 @@ def settings_customise_sources(
588588
) -> Tuple[PydanticBaseSettingsSource, ...]
589589
```
590590

591-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1109)
591+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1105)
592592

593593
Included to ignore reading/setting values from the environment
594594

@@ -602,7 +602,7 @@ Included to ignore reading/setting values from the environment
602602
def copy(**kwargs) -> "ApplicationConfig"
603603
```
604604

605-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1122)
605+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/app.py#L1118)
606606

607607
Update the application config and return a copy
608608

docs/api-reference/kafka.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ A separate producer class used only internally for transactions
164164
class BaseConsumer()
165165
```
166166

167-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L81)
167+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L82)
168168

169169
<a id="quixstreams.kafka.consumer.BaseConsumer.__init__"></a>
170170

@@ -184,7 +184,7 @@ def __init__(broker_address: Union[str, ConnectionConfig],
184184
extra_config: Optional[dict] = None)
185185
```
186186

187-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L82)
187+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L83)
188188

189189
A wrapper around `confluent_kafka.Consumer`.
190190

@@ -229,7 +229,7 @@ def poll(
229229
) -> Optional[RawConfluentKafkaMessageProto]
230230
```
231231

232-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L145)
232+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L146)
233233

234234
Consumes a single message, calls callbacks and returns events.
235235

@@ -267,7 +267,7 @@ event or callback. None or -1 is infinite. Default: None.
267267
def unsubscribe()
268268
```
269269

270-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L250)
270+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L251)
271271

272272
Remove current subscription.
273273

@@ -287,7 +287,7 @@ def store_offsets(message: Optional[Message] = None,
287287
offsets: Optional[List[TopicPartition]] = None)
288288
```
289289

290-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L259)
290+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L260)
291291

292292
Store offsets for a message or a list of offsets.
293293

@@ -320,7 +320,7 @@ def commit(message: Optional[Message] = None,
320320
asynchronous: bool = True) -> Optional[List[TopicPartition]]
321321
```
322322

323-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L290)
323+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L291)
324324

325325
Commit a message or a list of offsets.
326326

@@ -358,7 +358,7 @@ def committed(partitions: List[TopicPartition],
358358
timeout: Optional[float] = None) -> List[TopicPartition]
359359
```
360360

361-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L331)
361+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L332)
362362

363363
Retrieve committed offsets for the specified partitions.
364364

@@ -393,7 +393,7 @@ def get_watermark_offsets(partition: TopicPartition,
393393
cached: bool = False) -> Tuple[int, int]
394394
```
395395

396-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L349)
396+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L350)
397397

398398
Retrieve low and high offsets for the specified partition.
399399

@@ -432,7 +432,7 @@ def list_topics(topic: Optional[str] = None,
432432
timeout: Optional[float] = None) -> ClusterMetadata
433433
```
434434

435-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L375)
435+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L376)
436436

437437
Request metadata from the cluster.
438438

@@ -464,7 +464,7 @@ None or -1 is infinite. Default: None
464464
def memberid() -> Optional[str]
465465
```
466466

467-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L396)
467+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L397)
468468

469469
Return this client's broker-assigned group member id.
470470

@@ -492,7 +492,7 @@ def offsets_for_times(partitions: List[TopicPartition],
492492
timeout: Optional[float] = None) -> List[TopicPartition]
493493
```
494494

495-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L409)
495+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L410)
496496

497497
Look up offsets by timestamp for the specified partitions.
498498

@@ -531,7 +531,7 @@ None or -1 is infinite. Default: None
531531
def pause(partitions: List[TopicPartition])
532532
```
533533

534-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L435)
534+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L436)
535535

536536
Pause consumption for the provided list of partitions.
537537

@@ -559,7 +559,7 @@ Does NOT affect the result of `Consumer.assignment()`.
559559
def resume(partitions: List[TopicPartition])
560560
```
561561

562-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L448)
562+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L449)
563563

564564
Resume consumption for the provided list of partitions.
565565

@@ -583,7 +583,7 @@ Resume consumption for the provided list of partitions.
583583
def position(partitions: List[TopicPartition]) -> List[TopicPartition]
584584
```
585585

586-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L458)
586+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L459)
587587

588588
Retrieve current positions (offsets) for the specified partitions.
589589

@@ -616,7 +616,7 @@ the last consumed message + 1.
616616
def seek(partition: TopicPartition)
617617
```
618618

619-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L472)
619+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L473)
620620

621621
Set consume position for partition to offset.
622622

@@ -648,7 +648,7 @@ pass the offset in an `assign()` call.
648648
def assignment() -> List[TopicPartition]
649649
```
650650

651-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L489)
651+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L490)
652652

653653
Returns the current partition assignment.
654654

@@ -673,7 +673,7 @@ Returns the current partition assignment.
673673
def set_sasl_credentials(username: str, password: str)
674674
```
675675

676-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L502)
676+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L503)
677677

678678
Sets the SASL credentials used for this client.
679679

@@ -700,7 +700,7 @@ This method is applicable only to SASL PLAIN and SCRAM mechanisms.
700700
def incremental_assign(partitions: List[TopicPartition])
701701
```
702702

703-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L516)
703+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L517)
704704

705705
Assign new partitions.
706706

@@ -726,7 +726,7 @@ Any additional partitions besides the ones passed during the `Consumer`
726726
def assign(partitions: List[TopicPartition])
727727
```
728728

729-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L530)
729+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L531)
730730

731731
Set the consumer partition assignment to the provided list of `TopicPartition` and start consuming.
732732

@@ -751,7 +751,7 @@ Set the consumer partition assignment to the provided list of `TopicPartition` a
751751
def incremental_unassign(partitions: List[TopicPartition])
752752
```
753753

754-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L540)
754+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L541)
755755

756756
Revoke partitions.
757757

@@ -773,7 +773,7 @@ Can be called outside an on_revoke callback.
773773
def unassign()
774774
```
775775

776-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L550)
776+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L551)
777777

778778
Removes the current partition assignment and stops consuming.
779779

@@ -792,7 +792,7 @@ Removes the current partition assignment and stops consuming.
792792
def close()
793793
```
794794

795-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L559)
795+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L560)
796796

797797
Close down and terminate the Kafka Consumer.
798798

@@ -815,7 +815,7 @@ see `poll()` for more info.
815815
def consumer_group_metadata() -> GroupMetadata
816816
```
817817

818-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L576)
818+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/kafka/consumer.py#L577)
819819

820820
Used by the producer during consumer offset sending for an EOS transaction.
821821

0 commit comments

Comments
 (0)