Automated Action 7658939790 Create Task Manager API with FastAPI and SQLite
- Set up project structure and dependencies
- Create task model and schema
- Implement Alembic migrations
- Add CRUD API endpoints for task management
- Add health endpoint with database connectivity check
- Add comprehensive error handling
- Add tests for API endpoints
- Update README with API documentation
2025-06-04 22:52:31 +00:00

22 lines
575 B
Python

import os
from pathlib import Path
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
# API settings
PROJECT_NAME: str = "Task Manager API"
API_V1_STR: str = "/api/v1"
DEBUG: bool = os.getenv("DEBUG", "False").lower() in ("true", "1", "t")
# SQLite Database settings
DB_DIR: Path = Path("/app") / "storage" / "db"
class Config:
env_file = ".env"
case_sensitive = True
# Create settings instance
settings = Settings()
# Ensure DB directory exists
settings.DB_DIR.mkdir(parents=True, exist_ok=True)