Skip to content

AggregatedConverterConfig

Base classes

Name Children Inherits
BaseConverterConfig
docler_config.converter_configs
Base configuration for document converters.

⋔ Inheritance diagram

graph TD
  728058343["converter_configs.AggregatedConverterConfig"]
  2232753316["converter_configs.BaseConverterConfig"]
  1396724084["provider.ProviderConfig"]
  1261767679["main.BaseSettings"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2232753316 --> 728058343
  1396724084 --> 2232753316
  1261767679 --> 1396724084
  3879467795 --> 1261767679
  2751680898 --> 3879467795

🛈 DocStrings

Bases: BaseConverterConfig

Configuration for the aggregated converter.

Source code in src/docler_config/converter_configs.py
class AggregatedConverterConfig(BaseConverterConfig):
    """Configuration for the aggregated converter."""

    type: Literal["aggregated"] = Field(default="aggregated", init=False)
    """Type discriminator for aggregated converter."""

    converters: list[ConverterConfig] = Field(default_factory=list)
    """List of converter configurations to use."""

    mime_preferences: dict[str, str] = Field(default_factory=dict)
    """Mapping of MIME types or extensions to preferred converter names."""

    def get_provider(self) -> DocumentConverter:
        """Get the converter instance."""
        from docler.converters.aggregated_converter import AggregatedConverter

        return AggregatedConverter.from_config(self)

converters class-attribute instance-attribute

converters: list[ConverterConfig] = Field(default_factory=list)

List of converter configurations to use.

mime_preferences class-attribute instance-attribute

mime_preferences: dict[str, str] = Field(default_factory=dict)

Mapping of MIME types or extensions to preferred converter names.

type class-attribute instance-attribute

type: Literal['aggregated'] = Field(default='aggregated', init=False)

Type discriminator for aggregated converter.

get_provider

get_provider() -> DocumentConverter

Get the converter instance.

Source code in src/docler_config/converter_configs.py
def get_provider(self) -> DocumentConverter:
    """Get the converter instance."""
    from docler.converters.aggregated_converter import AggregatedConverter

    return AggregatedConverter.from_config(self)

:fa-brands-github: Show source on GitHub