Todo App API

A simple todo application API built with FastAPI and SQLite.

Features

  • Create, read, update, and delete todo items
  • Health check endpoint
  • SQLite database with Alembic migrations
  • Pydantic data validation
  • Interactive API documentation

Project Structure

todoapp/
├── app/
│   ├── api/
│   │   ├── endpoints/
│   │   │   ├── health.py
│   │   │   └── todos.py
│   │   └── api.py
│   ├── core/
│   │   └── config.py
│   ├── crud/
│   │   └── todo.py
│   ├── db/
│   │   ├── deps.py
│   │   └── session.py
│   ├── models/
│   │   └── todo.py
│   └── schemas/
│       └── todo.py
├── migrations/
│   ├── versions/
│   │   └── a3bfb446d052_create_todos_table.py
│   ├── env.py
│   └── script.py.mako
├── alembic.ini
├── main.py
└── requirements.txt

Setup

  1. Clone the repository

  2. Install dependencies:

pip install -r requirements.txt
  1. Run the application:
uvicorn main:app --reload

API Documentation

Once the application is running, you can access the API documentation at:

API Endpoints

Todos

  • GET /api/v1/todos/: Get all todos
  • POST /api/v1/todos/: Create a new todo
  • GET /api/v1/todos/{id}: Get a specific todo
  • PUT /api/v1/todos/{id}: Update a todo
  • DELETE /api/v1/todos/{id}: Delete a todo

Health

  • GET /api/v1/health/: Check API health status
Description
Project: Todo App
Readme 40 KiB
Languages
Python 95.9%
Mako 4.1%