Data input¶
Input manager base class
Input
¶
Bases: ABC
Abstract class for managing input data.
Attributes:
| Name | Type | Description |
|---|---|---|
log |
logging.Logger
|
Logger instance. |
__add__(*inputs)
¶
Compose multiple inputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inputs |
Input
|
Variable number of Input instances. |
()
|
Returns:
| Type | Description |
|---|---|
Union[bool, str]
|
Union[bool, str]: True if successful, error message otherwise. |
collect_metrics()
abstractmethod
¶
Collect metrics like latency.
Returns:
| Type | Description |
|---|---|
Dict[str, float]
|
Dict[str, float]: A dictionary containing metrics. |
compose(*inputs)
abstractmethod
¶
Compose multiple inputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inputs |
Input
|
Variable number of Input instances. |
()
|
Returns:
| Type | Description |
|---|---|
Union[bool, str]
|
Union[bool, str]: True if successful, error message otherwise. |
get()
abstractmethod
¶
Abstract method to get data from the input source.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The data from the input source. |
retryable_get()
¶
Retryable get method.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The data from the input source. |