
- Add comprehensive user schemas with email validation - Implement enhanced todo schemas with priority levels, tags, due dates, and subtasks - Add support for recurring todos with pattern validation - Include sharing schemas for collaborative features - Add proper validation rules and field constraints - Create response schemas for API pagination and collections - Include authentication and API response schemas - Add comprehensive documentation strings for all schema classes
Todo App Backend
A simple todo application backend built with FastAPI and SQLite.
Features
- Create, read, update, and delete todos
- RESTful API endpoints
- SQLite database with SQLAlchemy ORM
- Database migrations with Alembic
- Automatic API documentation with Swagger UI
- CORS support for cross-origin requests
API Endpoints
GET /
- Root endpoint with API informationGET /health
- Health check endpointPOST /todos/
- Create a new todoGET /todos/
- Get all todos (with pagination)GET /todos/{todo_id}
- Get a specific todoPUT /todos/{todo_id}
- Update a todoDELETE /todos/{todo_id}
- Delete a todo
Installation
- Install dependencies:
pip install -r requirements.txt
- The application will automatically create the database tables when started.
Usage
Start the application:
uvicorn main:app --reload
The API will be available at:
- Main API: http://localhost:8000
- Documentation: http://localhost:8000/docs
- Alternative docs: http://localhost:8000/redoc
Database
The application uses SQLite database stored at /app/storage/db/db.sqlite
. The database schema is managed with Alembic migrations.
Todo Schema
Each todo has the following fields:
id
: Unique identifiertitle
: Todo title (required)description
: Optional descriptioncompleted
: Boolean status (default: false)created_at
: Creation timestampupdated_at
: Last update timestamp
Description
Languages
Python
97.7%
Mako
2.3%