Automated Action 18f0e055cd Create simple todo app with FastAPI and SQLite
- Setup FastAPI project structure
- Create SQLAlchemy models and database connection
- Implement Alembic migrations
- Create CRUD operations for todos
- Add API endpoints for todos
- Add health endpoint
- Update README.md

generated with BackendIM... (backend.im)
2025-05-13 05:06:00 +00:00

Simple Todo App

A simple Todo API built with FastAPI and SQLite.

Features

  • RESTful API for managing todo items
  • SQLite database for data storage
  • Alembic migrations
  • CRUD operations for todos

Project Structure

.
├── alembic/               # Database migrations
│   └── versions/          # Migration scripts
├── app/                   # Application package
│   ├── api/               # API endpoints
│   ├── core/              # Core components
│   ├── crud/              # CRUD operations
│   ├── db/                # Database components
│   ├── models/            # SQLAlchemy models
│   └── schemas/           # Pydantic schemas
├── alembic.ini            # Alembic configuration
├── main.py                # Application entry point
└── requirements.txt       # Dependencies

API Endpoints

  • GET /api/v1/todos - List all todos
  • POST /api/v1/todos - Create a new todo
  • GET /api/v1/todos/{todo_id} - Get a specific todo
  • PUT /api/v1/todos/{todo_id} - Update a todo
  • DELETE /api/v1/todos/{todo_id} - Delete a todo
  • GET /health - Health check endpoint

Getting Started

Prerequisites

  • Python 3.8+
  • pip

Installation

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Run database migrations:
    alembic upgrade head
    
  4. Start the application:
    uvicorn main:app --reload
    

API Documentation

Once the application is running, you can access:

Description
Project: Simple Todo App
Readme 36 KiB
Languages
Python 95.5%
Mako 4.5%