Files
SmartUp/backend/app/config.py
T
2026-05-12 17:51:53 +08:00

21 lines
575 B
Python

from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
admin_email: str = "admin@smartup.local"
admin_password: str = "changeme"
jwt_secret: str = "change-me-in-production"
jwt_expire_hours: int = 24
database_url: str = "sqlite:////app/data/app.db"
tz: str = "Asia/Shanghai"
# consecutive failures before upstream goes unhealthy
unhealthy_threshold: int = 3
model_config = {"env_file": ".env", "case_sensitive": False}
@lru_cache
def get_settings() -> Settings:
return Settings()