Skip to content

Settings

Settings

Bases: BaseSettings

investigraph settings management using pydantic-settings

Note

All settings can be set via environment variables (or a .env file), prepending INVESTIGRAPH_ (except for those with a different alias)

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

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

    model_config = SettingsConfigDict(
        env_prefix="investigraph_",
        env_nested_delimiter="_",
        nested_model_default_partial_update=True,
        env_file=".env",
        extra="ignore",
    )

    debug: bool = Field(default=False, alias="debug")
    """Enable debug mode (more error output)"""

    data_root: Path = DATA_ROOT
    """Default data directory to store archive and json exports"""

    config: str | None = None
    """Use this config.yml globally"""

    seeder: str = "investigraph.logic.seed:handle"
    """Use this seed handler globally"""

    extractor: str = "investigraph.logic.extract:handle"
    """Use this extract handler globally"""

    transformer: str = "investigraph.logic.transform:map_ftm"
    """Use this transform handler globally"""

    loader: str = "investigraph.logic.load:handle"
    """Use this load handler globally"""

    exporter: str = "investigraph.logic.export:handle"
    """Use this export handler globally"""

    archive: StoreModel = StoreModel(uri=DATA_ROOT / "archive")
    """Remote file archive store"""

    cache: StoreModel = StoreModel(uri="memory:///")
    """Runtime cache"""

    extract_cache: bool = True
    """Use extract cache (don't extract sources already seen)"""

    store_uri: str = Field(default="memory:///", alias="ftm_statement_store")
    """Statement store for entity aggregation"""

archive = StoreModel(uri=(DATA_ROOT / 'archive')) class-attribute instance-attribute

Remote file archive store

cache = StoreModel(uri='memory:///') class-attribute instance-attribute

Runtime cache

config = None class-attribute instance-attribute

Use this config.yml globally

data_root = DATA_ROOT class-attribute instance-attribute

Default data directory to store archive and json exports

debug = Field(default=False, alias='debug') class-attribute instance-attribute

Enable debug mode (more error output)

exporter = 'investigraph.logic.export:handle' class-attribute instance-attribute

Use this export handler globally

extract_cache = True class-attribute instance-attribute

Use extract cache (don't extract sources already seen)

extractor = 'investigraph.logic.extract:handle' class-attribute instance-attribute

Use this extract handler globally

loader = 'investigraph.logic.load:handle' class-attribute instance-attribute

Use this load handler globally

seeder = 'investigraph.logic.seed:handle' class-attribute instance-attribute

Use this seed handler globally

store_uri = Field(default='memory:///', alias='ftm_statement_store') class-attribute instance-attribute

Statement store for entity aggregation

transformer = 'investigraph.logic.transform:map_ftm' class-attribute instance-attribute

Use this transform handler globally