class documentation

Undocumented

Async Method read Reads a stream of data
Async Method sink Sinkes a record to a stream
Class Variable client Undocumented
Class Variable mappings Undocumented
Class Variable record_coder Undocumented
Class Variable stream_name Undocumented
Instance Variable read_timestamp 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
async def sink(self, records: list[dict]): (source)

Sinkes a record to a stream

```python stream_source = RedisStream(...)

await stream_source.sink(records=[
{"passenger_id": 20, "age": 23, ...}

])

Args:
record (dict): The record to sink
client: Redis = (source)

Undocumented

mappings: dict[str, str] = (source)

Undocumented

record_coder: RecordCoder = (source)

Undocumented

stream_name: str = (source)

Undocumented

read_timestamp: str = (source)

Undocumented