Skip to content

Settings

Settings

Bases: OpenAlephSettings

ingest-file settings management using pydantic-settings

Note

All settings can be set via environment variables, prepending INGESTORS_ (except for those with another alias) via runtime or in a .env file.

Source code in ingestors/settings.py
class Settings(OpenAlephSettings):
    """
    `ingest-file` settings management using
    [pydantic-settings](https://docs.pydantic.dev/latest/concepts/pydantic_settings/)

    Note:
        All settings can be set via environment variables, prepending
        `INGESTORS_` (except for those with another alias) via runtime or in a
        `.env` file.
    """

    model_config = SettingsConfigDict(
        env_prefix="ingestors_",
        env_file=".env",
        extra="ignore",  # other envs in .env file
    )

    convert_timeout: int = 300
    """Headless libreoffice document convert timeout in seconds"""

    ocr_vision_api: bool = False
    """Enable (expensive!) Google Cloud API"""

convert_timeout = 300 class-attribute instance-attribute

Headless libreoffice document convert timeout in seconds

ocr_vision_api = False class-attribute instance-attribute

Enable (expensive!) Google Cloud API