
- Set up project structure and requirements - Create database models and connection setup using SQLAlchemy - Set up Alembic migrations - Create API endpoints for Todo CRUD operations - Add health endpoint - Update README with project information generated with BackendIM... (backend.im)
Simple Todo Application
A simple Todo API built with FastAPI and SQLite, allowing users to create, read, update, and delete todo items.
Features
- RESTful API for managing todo items
- SQLite database with SQLAlchemy ORM
- Alembic migrations for database version control
- Health endpoint for monitoring application status
- Pydantic models for request/response validation
- API documentation with Swagger UI and ReDoc
Tech Stack
- Python 3.7+
- FastAPI
- SQLAlchemy
- Alembic
- SQLite
- Pydantic
- Uvicorn
API Endpoints
GET /todos
- List all todosPOST /todos
- Create a new todoGET /todos/{todo_id}
- Get a specific todoPUT /todos/{todo_id}
- Update a todoDELETE /todos/{todo_id}
- Delete a todoGET /health
- Check application health
Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run migrations:
alembic upgrade head
- Start the server:
uvicorn main:app --reload
API Documentation
After starting the application, you can access:
- Swagger UI at: http://localhost:8000/docs
- ReDoc at: http://localhost:8000/redoc
Description
Languages
Python
94.3%
Mako
5.7%