diff --git a/README.md b/README.md index 89cbede..8e1e974 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FastAPI Todo API -This is a simple Todo API built with FastAPI and SQLite. +A robust Todo API built with FastAPI and SQLite for efficient task management. ## Features @@ -8,19 +8,25 @@ This is a simple Todo API built with FastAPI and SQLite. - SQLite database with SQLAlchemy ORM - Alembic for database migrations - Health check endpoint +- Input validation with Pydantic +- Automatic API documentation +- Fast and efficient database operations ## Project Structure ``` . ├── alembic/ # Database migration files +│ └── versions/ # Migration version scripts ├── app/ # Application code │ ├── api/ # API endpoints +│ │ └── endpoints/ # Route handlers │ ├── core/ # Core functionality and config │ ├── crud/ # CRUD operations │ ├── db/ # Database setup │ ├── models/ # SQLAlchemy models -│ └── schemas/ # Pydantic schemas +│ ├── schemas/ # Pydantic schemas +│ └── storage/ # Database storage ├── alembic.ini # Alembic configuration ├── main.py # Application entry point └── requirements.txt # Project dependencies @@ -44,16 +50,42 @@ This is a simple Todo API built with FastAPI and SQLite. ## API Documentation -Once the server is running, you can access the API documentation at: +Once the server is running, you can access the interactive API documentation at: - Swagger UI: http://localhost:8000/docs - ReDoc: http://localhost:8000/redoc ## API Endpoints +### Todo Operations - `GET /api/v1/todos/`: Get all todos - `POST /api/v1/todos/`: Create a new todo - `GET /api/v1/todos/{todo_id}`: Get a specific todo by ID - `PUT /api/v1/todos/{todo_id}`: Update a specific todo - `DELETE /api/v1/todos/{todo_id}`: Delete a specific todo -- `GET /health`: Health check endpoint \ No newline at end of file + +### System Endpoints +- `GET /health`: Health check endpoint to verify API status + +## Todo Schema + +```json +{ + "id": 1, + "title": "Complete project", + "description": "Finish the FastAPI project by Friday", + "completed": false +} +``` + +## Development + +The API uses SQLAlchemy for ORM operations and Alembic for database migrations. The database file is stored in `app/storage/db/db.sqlite`. + +## Technologies + +- **FastAPI**: Modern, fast web framework for building APIs +- **SQLAlchemy**: SQL toolkit and ORM +- **Pydantic**: Data validation and settings management +- **Alembic**: Database migration tool +- **SQLite**: Lightweight disk-based database \ No newline at end of file