Simple Todo App
A simple todo application built with FastAPI and SQLite.
Features
- RESTful API for managing todo items
- Create, read, update, and delete todo items
- Health check endpoint
- SQLite database with SQLAlchemy ORM
- Database migrations with Alembic
- Proper error handling and validation
- API documentation with Swagger and ReDoc
Project Structure
├── app/ # Application package
│ ├── api/ # API endpoints
│ │ └── v1/ # API version 1
│ │ └── endpoints/ # API endpoint modules
│ ├── core/ # Core modules
│ ├── crud/ # CRUD operations
│ ├── db/ # Database modules
│ ├── models/ # SQLAlchemy models
│ └── schemas/ # Pydantic schemas
├── migrations/ # Alembic migrations
├── alembic.ini # Alembic configuration
├── main.py # Application entry point
└── requirements.txt # Python dependencies
Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
Running the Application
Start the application with:
uvicorn main:app --reload
The API will be available at http://localhost:8000
API Documentation
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
API Endpoints
Health Check
GET /health
- Check if the API is running
Todo Endpoints
GET /todos
- Get all todos (with pagination)POST /todos
- Create a new todoGET /todos/{todo_id}
- Get a specific todoPUT /todos/{todo_id}
- Update a todoDELETE /todos/{todo_id}
- Delete a todo
Description
Languages
Python
96.2%
Mako
3.8%