floq.client.sse
This module provides interface for handling service events stream.
- class floq.client.sse.EventStreamHandler(client: floq.client.api_client.ApiClient, schema: marshmallow.schema.Schema)
Bases:
objectHandles service streaming responses.
- context
Optional context to be passed to the callback function.
- Type
Optional[Any]
- open_stream(endpoint: str, listener: Optional[Callable[[floq.client.sse.TServerSideEvent, Optional[Any]], None]] = None) None
Opens a new stream and starts processing events.
- Parameters
endpoint – API service streaming endpoint.
listener – Optional callback function called after receiving a new event.
- class floq.client.sse.ExpectationJobStatusStreamHandler(client: floq.client.api_client.ApiClient)
Bases:
floq.client.sse.EventStreamHandlerHandles expectation job status event stream.
- class floq.client.sse.SampleJobStatusStreamHandler(client: floq.client.api_client.ApiClient)
Bases:
floq.client.sse.EventStreamHandlerHandles sample job status event stream.
- floq.client.sse.TServerSideEvent
floq.client.schemas.ServerSideEventtype objectalias of TypeVar(‘TServerSideEvent’, bound=
floq.client.schemas.ServerSideEvent)
- class floq.client.sse.TaskStatusStreamHandler(client: floq.client.api_client.ApiClient)
Bases:
floq.client.sse.EventStreamHandlerHandles asynchronous task status event stream.