Skip to content

sift_py.ingestion.buffer

CLASS DESCRIPTION
BufferedIngestionService

See sift_py.ingestion.service.IngestionService.buffered_ingestion

ATTRIBUTE DESCRIPTION
DEFAULT_BUFFER_SIZE

FlushCallback

TYPE: TypeAlias

OnErrorCallback

TYPE: TypeAlias

T

DEFAULT_BUFFER_SIZE module-attribute

DEFAULT_BUFFER_SIZE = 1000

FlushCallback module-attribute

FlushCallback: TypeAlias = Callable[[], None]

OnErrorCallback module-attribute

OnErrorCallback: TypeAlias = Callable[
    [
        BaseException,
        List[IngestWithConfigDataStreamRequest],
        FlushCallback,
    ],
    None,
]

T module-attribute

T = TypeVar('T', bound=_IngestionServiceImpl)

BufferedIngestionService

BufferedIngestionService(
    ingestion_service: T,
    buffer_size: Optional[int],
    flush_interval_sec: Optional[float],
    on_error: Optional[OnErrorCallback],
)

Bases: Generic[T]

See sift_py.ingestion.service.IngestionService.buffered_ingestion for more information and how to leverage buffered ingestion.

METHOD DESCRIPTION
__enter__
__exit__
flush

Flush and ingest all requests in buffer.

ingest_flows

Ingests flows in batches for each request generated from a flow.

try_ingest_flows

Ingests flows in batches and performs client-side validations for each request

__enter__

__enter__() -> Self

__exit__

__exit__(
    exc_type: Optional[Type[BaseException]],
    exc_val: Optional[BaseException],
    exc_tb: Optional[TracebackType],
) -> bool

flush

flush()

Flush and ingest all requests in buffer.

ingest_flows

ingest_flows(*flows: FlowOrderedChannelValues)

Ingests flows in batches for each request generated from a flow. See sift_py.ingestion.service.IngestionService.create_ingestion_request for more information.

try_ingest_flows

try_ingest_flows(*flows: Flow)

Ingests flows in batches and performs client-side validations for each request generated from a flow. See sift_py.ingestion.service.IngestionService.try_create_ingestion_request for more information.