from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): model_config = SettingsConfigDict(env_file=".env", extra="ignore") database_url: str = "postgresql+psycopg://benchpress:benchpress@localhost:5432/benchpress" secret_key: str = "dev-secret-key-change-me" access_token_expire_minutes: int = 60 * 24 * 30 cors_origins: str = ( "http://localhost:5173,http://localhost:3000,http://localhost," "https://localhost,capacitor://localhost,http://10.0.2.2:8000" ) plate_step_kg: float = 1.25 pause_limit_minutes: int = 15 rest_min_days: int = 3 rest_max_days: int = 5 @property def cors_origin_list(self) -> list[str]: return [o.strip() for o in self.cors_origins.split(",") if o.strip()] settings = Settings()