Automated Action 8557c1426e Enhance Todo application with advanced features
- 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)
2025-05-12 23:29:41 +00:00

2.6 KiB

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 filtering
  • POST /todos - Create a new todo
  • POST /todos/with-tags - Create a new todo with tags (creates tags if they don't exist)
  • GET /todos/{todo_id} - Get a specific todo
  • PUT /todos/{todo_id} - Update a todo
  • DELETE /todos/{todo_id} - Delete a todo

Search & Filtering

  • GET /todos/search - Search todos by title, description, or tag
  • GET /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 status
    • priority - Filter by priority level
    • tag - Filter by tag name
    • due_before - Filter todos due before a specific date
    • due_after - Filter todos due after a specific date
    • overdue - Filter overdue todos

Tag Management

  • GET /tags - Get all tags
  • POST /tags - Create a new tag
  • GET /tags/{tag_id} - Get a specific tag

Requirements

  • Python 3.8+
  • Dependencies listed in requirements.txt

Installation and Setup

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Run database migrations:
    alembic upgrade head
    
  4. 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