A lightweight task management API built using FastAPI.
- Framework: FastAPI
- Data Validation: Pydantic
- Development Server: Uvicorn
app/: Contains the application source code.main.py: Entrypoint of the application defining FastAPI routes.crud.py: In-memory storage helper functions (CRUD operations).schemas.py: Pydantic schemas for request validation and response serialization.models.py: Database models (placeholder for future integration).database.py: SQLAlchemy database session setup (placeholder for future integration).
requirements.txt: Python dependencies.
Make sure you have Python 3.8+ installed.
python3 -m venv .venv
source .venv/bin/activatepip install -r requirements.txtuvicorn app.main:app --reloadThe server will start at http://127.0.0.1:8000.
FastAPI provides automatic interactive documentation:
- Swagger UI: http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
POST |
/tasks |
Create a new task |
GET |
/tasks |
Get all tasks |
GET |
/tasks/{task_id} |
Get a specific task by ID |
PUT |
/tasks/{task_id} |
Update a specific task by ID |
DELETE |
/tasks/{task_id} |
Delete a specific task by ID |