Skip to content

Input streamer

[BETA] Defines the base class for input streamers.

BaseInputStreamer

Bases: ABC

[BETA] A base class for input streamers.

Attributes:

Name Type Description
state RealtimeState | None

The state of the input streamer.

input_queue Queue[RealtimeEvent] | None

The queue to put the input events.

close() async

Closes the input streamer.

This method is used to close the input streamer.

initialize(state, input_queue) async

Initializes the input streamer.

Parameters:

Name Type Description Default
input_queue Queue[RealtimeEvent]

The queue to put the input events.

required
state RealtimeState

The state of the input streamer.

required

stream_input() abstractmethod async

Streams the input from a certain source.

This method must be implemented by subclasses to define the logic for streaming the input.

Raises:

Type Description
NotImplementedError

If the method is not implemented in a subclass.