class documentation

class KafkaReadableStream(ReadableStream): (source)

View In Hierarchy

Undocumented

Async Method read Reads a stream of data
Class Variable client Undocumented
async def read(self, max_records: int | None = None, max_wait: float | None = None) -> list[dict]: (source)

Reads a stream of data

```python stream = RedisStream(...)

records = await stream.read(max_records=10, max_wait=5) print(records[0]) ``` >>> {"passenger_id": 20, "age": 23, ...}

Args:
max_records (int, optional): _description_. Defaults to None. max_wait (float, optional): _description_. Defaults to None.
Returns:
list[dict]: A list of the records returned
client: KafkaConsumer = (source)

Undocumented