
- Add due dates and priority level to todos - Add tags/categories for better organization - Implement advanced search and filtering - Create database migrations for model changes - Add endpoints for managing tags - Update 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
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
│ ├── 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
- 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
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%