23 lines
545 B
Python
23 lines
545 B
Python
"""Typed application settings: the only reader of environment variables."""
|
|
|
|
from enum import StrEnum
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class AppMode(StrEnum):
|
|
"""Runtime mode: live Spotify + Anthropic, or fixture-replay demo."""
|
|
|
|
LIVE = "live"
|
|
DEMO = "demo"
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings, loaded from the environment or a .env file."""
|
|
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
app_mode: AppMode = AppMode.DEMO
|
|
|
|
|
|
settings = Settings()
|