2025-05-17 22:13:56 +00:00

69 lines
1.7 KiB
Markdown

# 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:
```bash
pip install -r requirements.txt
```
## Running the Application
Start the application with:
```bash
uvicorn main:app --reload
```
The API will be available at http://localhost:8000
## API Documentation
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
## 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