first ruggedy draft
This commit is contained in:
18
apps/api/mousehold_api/config.py
Normal file
18
apps/api/mousehold_api/config.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user