from typing import List from pathlib import Path from pydantic_settings import BaseSettings class Settings(BaseSettings): # Base settings PROJECT_NAME: str = "FastAPI Endpoint Service" PROJECT_DESCRIPTION: str = "A fast endpoint service built with FastAPI" VERSION: str = "0.1.0" API_V1_STR: str = "/api/v1" SECRET_KEY: str = "change-this-in-production" DEBUG: bool = True # CORS settings CORS_ORIGINS: List[str] = ["*"] # Database DB_DIR = Path("/app") / "storage" / "db" DB_DIR.mkdir(parents=True, exist_ok=True) SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite" SQLALCHEMY_POOL_RECYCLE: int = 3600 class Config: env_file = ".env" settings = Settings()