A simple yet powerful Task Management API built with FastAPI and SQLModel.
This project allows you to create, read, update, and delete tasks through RESTful APIs and includes a lightweight web-based UI for quick task management.
- ποΈ Create, Read, Update, and Delete (CRUD) tasks
- π Filter tasks by status, priority, or search query
- π Track due dates and creation timestamps
- β Mark tasks as complete or pending
- π» Interactive built-in HTML UI
- π§ Backed by SQLite for simplicity and portability
- β‘ Built with FastAPI for high performance
- Python 3.9+
- FastAPI β Web Framework
- SQLModel β ORM (by Tiangolo, combines Pydantic & SQLAlchemy)
- SQLite β Database (default)
- Uvicorn β ASGI server for development
Follow the steps below to run the project locally.
git clone https://github.com/your-username/task-manager-api.git
cd task-manager-api
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
File / Folder | Description |
---|---|
main.py |
Main FastAPI application |
tasks.db |
SQLite database file |
requirements.txt |
Python dependencies |
README.md |
Project documentation |
Method | Endpoint | Description |
---|---|---|
GET |
/ |
Web UI for managing tasks |
GET |
/tasks/ |
List all tasks |
GET |
/tasks/{task_id} |
Get a specific task |
POST |
/tasks/ |
Create a new task |
PATCH |
/tasks/{task_id} |
Update an existing task |
DELETE |
/tasks/{task_id} |
Delete a task |
GET |
/health |
Health check endpoint |
POST /tasks/
Request Body:
{
"title": "Prepare project presentation",
"description": "Create slides and rehearse for the upcoming demo",
"priority": 1,
"due_date": "2025-10-12"
}
Response:
{
"id": 5,
"title": "Prepare project presentation",
"description": "Create slides and rehearse for the upcoming demo",
"done": false,
"priority": 1,
"due_date": "2025-10-12",
"created_at": "2025-10-06T15:45:22Z"
}
- Open your browser
- Add tasks using the input fields
- Mark tasks as done or edit them inline
- Tasks are automatically persisted to the SQLite database
Prince Patel
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project with proper attribution.