from pydantic_settings import BaseSettings from pathlib import Path from typing import List class Settings(BaseSettings): API_V1_STR: str = "/api/v1" PROJECT_NAME: str = "Simple Inventory Management App" # Database settings DB_DIR: Path = Path("/app") / "storage" / "db" SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite" # CORS Settings BACKEND_CORS_ORIGINS: List[str] = ["*"] class Config: env_file = ".env" case_sensitive = True # Create DB directory if it doesn't exist Path("/app/storage/db").mkdir(parents=True, exist_ok=True) settings = Settings()