
- Set up project structure - Created Task model with SQLAlchemy - Implemented SQLite database connection - Created Alembic migrations - Added Task CRUD endpoints - Added health endpoint - Updated README with project details generated with BackendIM... (backend.im)
Task Manager API
A RESTful API for managing tasks, built with FastAPI and SQLite.
Features
- Task CRUD operations
- Task status and priority management
- Task completion tracking
- API documentation with Swagger UI and ReDoc
- Health endpoint for monitoring
Tech Stack
- FastAPI: Modern, high-performance web framework for building APIs
- SQLAlchemy: SQL toolkit and Object-Relational Mapping (ORM)
- Alembic: Database migration tool
- SQLite: Lightweight relational database
- Pydantic: Data validation and settings management
- Uvicorn: ASGI server for FastAPI applications
API Endpoints
Task Management
GET /api/v1/tasks
: Get all tasksPOST /api/v1/tasks
: Create a new taskGET /api/v1/tasks/{task_id}
: Get a specific taskPUT /api/v1/tasks/{task_id}
: Update a taskDELETE /api/v1/tasks/{task_id}
: Delete a taskPOST /api/v1/tasks/{task_id}/complete
: Mark a task as completed
Health Check
GET /health
: Application health check
Project Structure
taskmanagerapi/
├── alembic/ # Database migrations
│ └── versions/ # Migration scripts
├── app/
│ ├── api/ # API endpoints
│ │ └── routers/ # API route definitions
│ ├── core/ # Core application code
│ ├── crud/ # CRUD operations
│ ├── db/ # Database setup and models
│ ├── models/ # SQLAlchemy models
│ └── schemas/ # Pydantic schemas/models
├── main.py # Application entry point
└── requirements.txt # Project dependencies
Getting Started
Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
Running Migrations
alembic upgrade head
Starting the Application
uvicorn main:app --reload
The API will be available at http://localhost:8000
API Documentation
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Description
Languages
Python
99.5%
Mako
0.5%