2025-05-22 12:45:01 +00:00

19 lines
486 B
Python

from pathlib import Path
from typing import List
from pydantic import BaseModel
class Settings(BaseModel):
PROJECT_NAME: str = "SimpleTodo API"
VERSION: str = "0.1.0"
DESCRIPTION: str = "A simple Todo API built with FastAPI and SQLite"
CORS_ORIGINS: List[str] = ["*"]
# Database settings
DB_DIR = Path("/app") / "storage" / "db"
DB_DIR.mkdir(parents=True, exist_ok=True)
DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
settings = Settings()