
- Added due_date field to Todo model
- Updated schemas to include due_date field
- Created Alembic migration for the new field
- Added API endpoint to filter todos by due date range
- Updated README to document the new feature
🤖 Generated with BackendIM... (backend.im)
Co-Authored-By: Claude <noreply@anthropic.com>
Simple Todo Application
A RESTful API for a Todo application built with FastAPI and SQLite.
Features
- Create, Read, Update, and Delete Todo items
- Due date assignment and tracking for todo items
- Filtering todos by due date range
- Health endpoint for application monitoring
- SQLite database with SQLAlchemy ORM
- Database migrations with Alembic
API Endpoints
- GET /health: Check application health
- GET /api/v1/todos: List all todos
- POST /api/v1/todos: Create a new todo
- GET /api/v1/todos/{id}: Get a specific todo by ID
- PUT /api/v1/todos/{id}: Update a todo
- DELETE /api/v1/todos/{id}: Delete a todo
- GET /api/v1/todos/due-date/: Filter todos by due date range
Getting Started
Prerequisites
- Python 3.8 or higher
- FastAPI
- SQLAlchemy
- Alembic
Installation
- 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
API documentation is automatically generated and available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Project Structure
.
├── alembic/ # Database migration files
├── app/ # Application package
│ ├── api/ # API routes
│ │ └── endpoints/ # API endpoint modules
│ ├── core/ # Core functionality
│ ├── db/ # Database setup
│ ├── models/ # SQLAlchemy models
│ └── schemas/ # Pydantic schemas
├── main.py # Application entry point
├── alembic.ini # Alembic configuration
└── requirements.txt # Project dependencies
Description
Languages
Python
95.6%
Mako
4.4%