Automated Action 264e7b36d7 Create Todo application with FastAPI
- Set up project structure and dependencies
- Create Todo model with SQLAlchemy
- Implement CRUD operations for todos
- Create API endpoints for todos
- Set up Alembic migrations
- Update documentation

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

51 lines
1.1 KiB
Markdown

# Todo Application
This is a simple Todo application built with FastAPI and SQLite.
## Features
- Create, read, update, and delete todos
- Filter todos by completion status
- Pagination support
## API Endpoints
- `GET /todos`: List all todos
- `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
- `GET /health`: Health check endpoint
## Running the Application
1. Install dependencies:
```
pip install -r requirements.txt
```
2. Apply migrations:
```
alembic upgrade head
```
3. Run the application:
```
uvicorn main:app --reload
```
4. Access the API documentation:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
## Project Structure
- `app/`: Main application package
- `api/`: API endpoints
- `crud/`: Database CRUD operations
- `db/`: Database configuration
- `models/`: SQLAlchemy models
- `schemas/`: Pydantic schemas
- `alembic/`: Database migrations
- `main.py`: Application entry point
- `requirements.txt`: Project dependencies