Automated Action af6c39316b Create simple FastAPI Todo app with SQLite
- Set up project structure with FastAPI app
- Create SQLite database models with SQLAlchemy
- Set up Alembic migrations
- Implement CRUD endpoints for todo items
- Add health check endpoint
- Update README with setup instructions

generated with BackendIM... (backend.im)
2025-05-13 15:51:44 +00:00

Simple Todo App with FastAPI and SQLite

A minimalist Todo API application built with FastAPI and SQLite for managing todo items.

Features

  • Create, read, update, and delete todo items
  • SQLite database with SQLAlchemy ORM
  • Alembic migrations for database versioning
  • Health check endpoint for monitoring
  • OpenAPI documentation

Prerequisites

  • Python 3.8+
  • pip (Python package installer)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/simpletodoapp.git
cd simpletodoapp
  1. Install dependencies:
pip install -r requirements.txt
  1. Prepare the database directory:
mkdir -p /app/storage/db
  1. Run database migrations:
alembic upgrade head

Running the Application

Start the application with Uvicorn:

uvicorn main:app --reload

The API will be available at http://localhost:8000

API Documentation

Once the application is running, you can access:

API Endpoints

  • GET /todos - Get all todos
  • POST /todos - Create a new todo
  • GET /todos/{todo_id} - Get a specific todo
  • PATCH /todos/{todo_id} - Update a todo
  • DELETE /todos/{todo_id} - Delete a todo
  • GET /health - Check application health

Example Todo JSON

{
  "title": "Buy groceries",
  "description": "Milk, eggs, bread, and cheese",
  "completed": false
}
Description
Project: Simple Todo App
Readme 36 KiB
Languages
Python 94.4%
Mako 5.6%