Todo Backend Service
A simple Todo API built with FastAPI and SQLite.
Features
- Todo CRUD operations
- RESTful API design
- SQLite database with SQLAlchemy ORM
- Alembic for database migrations
Requirements
Python 3.8+
Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run database migrations:
alembic upgrade head
Running the Application
uvicorn main:app --reload
The API will be available at http://localhost:8000
Swagger documentation is available at http://localhost:8000/docs
API Endpoints
Method | URL | Description |
---|---|---|
GET | /api/v1/todos | Get all todos |
GET | /api/v1/todos/{id} | Get a todo by id |
POST | /api/v1/todos | Create a new todo |
PUT | /api/v1/todos/{id} | Update a todo |
DELETE | /api/v1/todos/{id} | Delete a todo |
Example JSON Payload for Creating a Todo
{
"title": "Buy groceries",
"description": "Milk, eggs, bread",
"completed": false
}
Description
Languages
Python
95.6%
Mako
4.4%