Automated Action b5638b4c86 Add Simple Todo Application with FastAPI and SQLite
- Create project structure with FastAPI setup
- Implement Todo model with SQLAlchemy
- Set up database migrations with Alembic
- Create CRUD API endpoints for Todo items
- Add health endpoint for application monitoring
- Update README with documentation

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

59 lines
1.7 KiB
Markdown

# Simple Todo Application
A RESTful API for a Todo application built with FastAPI and SQLite.
## Features
- Create, Read, Update, and Delete Todo items
- Health endpoint for application monitoring
- SQLite database with SQLAlchemy ORM
- Database migrations with Alembic
## API Endpoints
- **GET /health**: Check application health
- **GET /api/v1/todos**: List all todos
- **POST /api/v1/todos**: Create a new todo
- **GET /api/v1/todos/{id}**: Get a specific todo by ID
- **PUT /api/v1/todos/{id}**: Update a todo
- **DELETE /api/v1/todos/{id}**: Delete a todo
## Getting Started
### Prerequisites
- Python 3.8 or higher
- FastAPI
- SQLAlchemy
- Alembic
### Installation
1. Clone the repository
2. Install dependencies: `pip install -r requirements.txt`
3. Run database migrations: `alembic upgrade head`
4. Start the server: `uvicorn main:app --reload`
### API Documentation
API documentation is automatically generated and available at:
- Swagger UI: [http://localhost:8000/docs](http://localhost:8000/docs)
- ReDoc: [http://localhost:8000/redoc](http://localhost:8000/redoc)
## Project Structure
```
.
├── alembic/ # Database migration files
├── app/ # Application package
│ ├── api/ # API routes
│ │ └── endpoints/ # API endpoint modules
│ ├── core/ # Core functionality
│ ├── db/ # Database setup
│ ├── models/ # SQLAlchemy models
│ └── schemas/ # Pydantic schemas
├── main.py # Application entry point
├── alembic.ini # Alembic configuration
└── requirements.txt # Project dependencies
```