from pathlib import Path from pydantic_settings import BaseSettings class Settings(BaseSettings): """Application settings class.""" API_V1_STR: str = "/api/v1" PROJECT_NAME: str = "Authentication Service" # SECURITY SECRET_KEY: str = "your-secret-key-please-change-in-production" ACCESS_TOKEN_EXPIRE_MINUTES: int = 30 # CORS BACKEND_CORS_ORIGINS: list[str] = ["*"] # DATABASE DB_DIR: Path = Path("/app") / "storage" / "db" SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite" class Config: """Configuration class for Settings.""" case_sensitive = True settings = Settings() # Ensure DB directory exists settings.DB_DIR.mkdir(parents=True, exist_ok=True)