
- Set up project structure - Configure SQLite database connection - Create Todo model and schema - Implement CRUD API endpoints for todo items - Add health check endpoint - Update README with documentation generated with BackendIM... (backend.im)
Simple Todo Application
A simple Todo application API built with FastAPI and SQLite.
Features
- Create, read, update, and delete todo items
- Filter todos by completion status
- Pagination support
- Health check endpoint
API Endpoints
GET /api/todos
: List all todos with optional filtering and paginationPOST /api/todos
: Create a new todoGET /api/todos/{todo_id}
: Get a specific todo by IDPATCH /api/todos/{todo_id}
: Update a todoDELETE /api/todos/{todo_id}
: Delete a todoGET /health
: Application health check
Getting Started
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn main:app --reload
-
Access the API documentation:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Data Model
Todo
id
: Integer (primary key)title
: String (required)description
: String (optional)completed
: Boolean (default: false)created_at
: DateTime (auto-generated)updated_at
: DateTime (auto-updated)
Description
Languages
Python
94.7%
Mako
5.3%