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

  1. Clone the repository
  2. 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

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 todo
  • GET /todos/{todo_id} - Get a specific todo
  • PUT /todos/{todo_id} - Update a todo
  • DELETE /todos/{todo_id} - Delete a todo
Description
Project: Simple Todo App
Readme 39 KiB
Languages
Python 96.2%
Mako 3.8%