Skip to content

data_updater_v2.conf.settings

data-updater-v2 — Root settings.

Environment variables are loaded in this order (highest priority first): 1. Explicit env vars (K8s extraEnvs / injected secrets) 2. .env file (local development) 3. Defaults defined here

Add domain-specific configs as nested models: 1. Create a new file: conf/llm.py, conf/database.py, etc. 2. Define a pydantic BaseModel with your fields 3. Add it as a field here in Settings 4. Set defaults or load from env with env_prefix

Example — adding an LLM config:

conf/llm.py
from pydantic import BaseModel
class LLMConfig(BaseModel):
provider: str = "openai"
model_name: str = "gpt-4o"
temperature: float = 0.0
max_retries: int = 3
api_key: str = ""
base_url: str = ""
# Then in this file (settings.py):
from data_updater_v2.conf.llm import LLMConfig
class Settings(BaseSettings):
...
default_llm: LLMConfig = LLMConfig()
extraction_llm: LLMConfig = LLMConfig(model_name="gpt-4o", temperature=0.0)
processing_llm: LLMConfig = LLMConfig(model_name="gpt-4o-mini", temperature=0.7)
# Then in your app:
from data_updater_v2.conf import settings
llm = LLMFactory.create(settings.extraction_llm, defaults=settings.default_llm)

Classes

Settings

Bases: BaseSettings

Root application settings — all fields read from environment variables.