Input streamer
[BETA] Defines the base class for input streamers.
References
NONE
BaseInputStreamer
Bases: ABC
[BETA] A base class for input streamers.
Attributes:
| Name | Type | Description |
|---|---|---|
state |
BaseModel | None
|
The state of the input streamer. |
input_queue |
Queue | None
|
The queue to put the input events. |
close()
async
Closes the input streamer.
This method is used to close the input streamer. It is used to clean up the input streamer.
initialize(state, input_queue)
async
Initializes the input streamer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_queue |
Queue
|
The queue to put the input events. |
required |
state |
BaseModel
|
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. |