19 lines
543 B
Python
19 lines
543 B
Python
from functools import lru_cache
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "Mousehold API"
|
|
api_prefix: str = ""
|
|
database_url: str = "sqlite:///./data/mousehold.db"
|
|
cors_origins: list[str] = ["http://localhost:5173", "http://127.0.0.1:5173"]
|
|
local_agent_token: str = "dev-local-agent-token"
|
|
|
|
model_config = SettingsConfigDict(env_prefix="MOUSEHOLD_", env_file=".env", extra="ignore")
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings()
|