
- 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>
19 lines
478 B
Python
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() |