from functools import lru_cache from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore") # Security secret_key: str jwt_algorithm: str = "HS256" access_token_expire_minutes: int = 60 * 24 * 7 # 7 days # Database database_url: str # postgresql+asyncpg://... # Redis redis_url: str = "redis://localhost:6379/0" job_queue_key: str = "rh:jobs" # App domain: str = "localhost" debug: bool = False # Worker analysis_version: str = "1.0.0" @lru_cache def get_settings() -> Settings: return Settings() # type: ignore[call-arg]