taps.plugins¶
register() ¶
Decorator for registering plugin configurations.
Example
An app config can be defined and registered using a name.
from concurrent.futures import Executor
from pydantic import Field
from taps.plugins import register
from taps.executor.config import ExecutorConfig
@register('executor')
class FooConfig(ExecutorConfig):
    name: Literal['foo'] = 'foo'
    n: int = Field(1, description='count')
    def get_executor(self) -> Executor:
        ...
Registration will make the executor named "foo" available within the CLI and configuration files. ```
Parameters:
- 
        
kind(PluginType) –Kind of plugin that is being registered.
 
Source code in taps/plugins.py
        get_app_configs() ¶
Get all registered application configs.
Returns:
get_executor_configs() ¶
get_executor_configs() -> dict[str, type[ExecutorConfig]]
Get all registered executor configs.
Returns:
- 
            
dict[str, type[ExecutorConfig]]–Mapping of executor name to the config type.
 
get_filter_configs() ¶
get_filter_configs() -> dict[str, type[FilterConfig]]
Get all registered filter configs.
Returns:
- 
            
dict[str, type[FilterConfig]]–Mapping of filter name to the config type.
 
get_transformer_configs() ¶
get_transformer_configs() -> (
    dict[str, type[TransformerConfig]]
)
Get all registered transformer configs.
Returns:
- 
            
dict[str, type[TransformerConfig]]–Mapping of transformer name to the config type.