Automated Action e84ae05b4e Implement simple Todo application with FastAPI and SQLite
- 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)
2025-05-13 11:24:31 +00:00

46 lines
1.0 KiB
Markdown

# 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 pagination
- `POST /api/todos`: Create a new todo
- `GET /api/todos/{todo_id}`: Get a specific todo by ID
- `PATCH /api/todos/{todo_id}`: Update a todo
- `DELETE /api/todos/{todo_id}`: Delete a todo
- `GET /health`: Application health check
## Getting Started
1. Install dependencies:
```
pip install -r requirements.txt
```
2. Run the application:
```
uvicorn main:app --reload
```
3. 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)