
- Added subtask model with CRUD operations - Added reminder functionality to Todo model - Added endpoints for managing subtasks and reminders - Created new migration for subtasks and reminders - Updated documentation generated with BackendIM... (backend.im)
Enhanced Todo API Application
This is an improved Todo API application built with FastAPI and SQLite, featuring advanced task management capabilities.
Features
- Create, Read, Update, and Delete todos
- Todo prioritization (low, medium, high)
- Due dates for deadline tracking
- Tag/category support for organizing todos
- Advanced search and filtering capabilities
- Upcoming tasks view for planning
- Health endpoint for monitoring application status
- SQLite database for data persistence
- Alembic for database migrations
- NEW Subtasks support for breaking down complex todos
- NEW Task reminder functionality
Project Structure
simpletodoapplication/
├── app/
│ ├── __init__.py
│ ├── database.py
│ ├── models.py
│ └── schemas.py
├── migrations/
│ ├── versions/
│ │ ├── 001_create_todos_table.py
│ │ ├── 002_add_priority_and_due_date.py
│ │ ├── 003_add_tags_table_and_associations.py
│ │ └── 004_add_subtasks_and_reminders.py
│ ├── env.py
│ ├── README
│ └── script.py.mako
├── alembic.ini
├── main.py
└── requirements.txt
API Endpoints
Health
GET /health
- Check API health
Todo Management
GET /todos
- Get all todos with optional filteringPOST /todos
- Create a new todoPOST /todos/with-tags
- Create a new todo with tags (creates tags if they don't exist)GET /todos/{todo_id}
- Get a specific todoPUT /todos/{todo_id}
- Update a todoDELETE /todos/{todo_id}
- Delete a todo
Search & Filtering
GET /todos/search
- Search todos by title, description, or tagGET /todos/upcoming
- Get todos due in the next N days (defaults to 7)GET /todos/reminders
- Get todos with reminders in the next N hours (defaults to 24)GET /todos
- With query parameters for advanced filtering:title
- Filter by title (partial match)description
- Filter by description (partial match)completed
- Filter by completion statuspriority
- Filter by priority leveltag
- Filter by tag namedue_before
- Filter todos due before a specific datedue_after
- Filter todos due after a specific dateoverdue
- Filter overdue todos
Tag Management
GET /tags
- Get all tagsPOST /tags
- Create a new tagGET /tags/{tag_id}
- Get a specific tag
Subtask Management
POST /todos/{todo_id}/subtasks
- Create a new subtask for a todoGET /todos/{todo_id}/subtasks
- Get all subtasks for a todoGET /subtasks/{subtask_id}
- Get a specific subtaskPUT /subtasks/{subtask_id}
- Update a subtaskDELETE /subtasks/{subtask_id}
- Delete a subtaskPUT /todos/{todo_id}/complete-all-subtasks
- Mark all subtasks of a todo as completed
Reminder Management
PUT /todos/{todo_id}/set-reminder
- Set or update a reminder for a todo
Requirements
- Python 3.8+
- Dependencies listed in requirements.txt
Installation and Setup
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run database migrations:
alembic upgrade head
- Start the server:
uvicorn main:app --reload
API Documentation
Once the application is running, you can access:
- Swagger UI documentation at
/docs
- ReDoc documentation at
/redoc
Description
Languages
Python
98.4%
Mako
1.6%