
- Set up project structure with FastAPI - Create Todo database model with SQLAlchemy - Add Alembic migrations - Implement CRUD API endpoints for todos - Add health endpoint for application monitoring - Add README with documentation generated with BackendIM... (backend.im)
16 lines
399 B
Python
16 lines
399 B
Python
from pydantic_settings import BaseSettings
|
|
from pathlib import Path
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
PROJECT_NAME: str = "Todo Application"
|
|
VERSION: str = "0.1.0"
|
|
API_V1_STR: str = "/api/v1"
|
|
|
|
# Database
|
|
DB_DIR = Path("/app") / "storage" / "db"
|
|
DB_DIR.mkdir(parents=True, exist_ok=True)
|
|
SQLALCHEMY_DATABASE_URL: str = f"sqlite:///{DB_DIR}/db.sqlite"
|
|
|
|
|
|
settings = Settings() |