from pathlib import Path from typing import List from pydantic_settings import BaseSettings class Settings(BaseSettings): # Project settings PROJECT_NAME: str = "Simple TODO Application" PROJECT_DESCRIPTION: str = "A simple TODO application built with FastAPI and SQLite" PROJECT_VERSION: str = "0.1.0" # API settings API_PREFIX: str = "/api" CORS_ORIGINS: List[str] = ["*"] # Database settings DB_DIR: Path = Path("/app") / "storage" / "db" class Config: env_file = ".env" case_sensitive = True settings = Settings() # Ensure database directory exists settings.DB_DIR.mkdir(parents=True, exist_ok=True)