Central registry for all data source processors.

Uses a class decorator pattern to automatically register processors when they are defined.

Attributes:
  • _processors (dict[str, Type[BaseProcessor]]) –

    Mapping of source names to processor classes

register(processor_class) classmethod

Register a processor class.

Used as a class decorator::

@ProcessorRegistry.register
class MyProcessor(BaseProcessor):
    ...
Parameters:
  • processor_class (Type[BaseProcessor]) –

    Processor class to register

Returns:
Raises:
  • ValueError

    If processor with same source_name already registered

get(source_name) classmethod

Get a processor instance by source name.

Parameters:
  • source_name (str) –

    Name of the data source

Returns:
Raises:
  • KeyError

    If processor not found

get_class(source_name) classmethod

Get a processor class (not instance) by source name.

Parameters:
  • source_name (str) –

    Name of the data source

Returns:
Raises:
  • KeyError

    If processor not found

list_processors() classmethod

Get list of all registered processor source names.

Returns:
  • list[str]

    List of registered source names

get_all() classmethod

Get all registered processor classes.

Returns:
  • dict[str, Type[BaseProcessor]]

    Mapping of source names to classes

is_registered(source_name) classmethod

Check if a processor is registered.

Parameters:
  • source_name (str) –

    Name of the data source

Returns:
  • bool

    True if processor is registered

unregister(source_name) classmethod

Unregister a processor (mainly for testing).

Parameters:
  • source_name (str) –

    Name of the data source to unregister

Raises:
  • KeyError

    If processor not found

clear() classmethod

Clear all registered processors (mainly for testing).

get_info(source_name) classmethod

Get information about a registered processor.

Parameters:
  • source_name (str) –

    Name of the data source

Returns:
  • dict[str, str]

    Dictionary with processor information

Raises:
  • KeyError

    If processor not found

get_all_info() classmethod

Get information about all registered processors.

Returns:
  • dict[str, dict[str, str]]

    Mapping of source names to info dicts