Automated Action f27201a3a6 Update SQLite configuration for on-disk database storage
- Add ClassVar type annotation for DB_DIR in config.py
- Add Base import in base.py for proper Alembic migrations
- Update README with detailed SQLite configuration information

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-11 19:17:11 +00:00

19 lines
478 B
Python

from pathlib import Path
from typing import ClassVar
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: ClassVar[Path] = 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()