Automated Action d2d0b364aa Create Todo application with FastAPI and SQLAlchemy
Generated with and Co-Authored by [BackendIM](https://backend.im)
2025-05-11 19:12:20 +00:00

17 lines
433 B
Python

from pathlib import Path
from pydantic_settings import BaseSettings
BASE_DIR = Path(__file__).resolve().parent.parent.parent
class Settings(BaseSettings):
PROJECT_NAME: str = "Todo Application"
API_V1_STR: str = "/api/v1"
# Database
DB_DIR = BASE_DIR.parent / "storage" / "db"
DB_DIR.mkdir(parents=True, exist_ok=True)
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
settings = Settings()