Automated Action aeab17a8ea Implement Task Manager API with FastAPI and SQLite
- Set up project structure
- Created Task model with SQLAlchemy
- Implemented SQLite database connection
- Created Alembic migrations
- Added Task CRUD endpoints
- Added health endpoint
- Updated README with project details

generated with BackendIM... (backend.im)
2025-05-14 07:18:59 +00:00

82 lines
2.0 KiB
Markdown

# Task Manager API
A RESTful API for managing tasks, built with FastAPI and SQLite.
## Features
- Task CRUD operations
- Task status and priority management
- Task completion tracking
- API documentation with Swagger UI and ReDoc
- Health endpoint for monitoring
## Tech Stack
- FastAPI: Modern, high-performance web framework for building APIs
- SQLAlchemy: SQL toolkit and Object-Relational Mapping (ORM)
- Alembic: Database migration tool
- SQLite: Lightweight relational database
- Pydantic: Data validation and settings management
- Uvicorn: ASGI server for FastAPI applications
## API Endpoints
### Task Management
- `GET /api/v1/tasks`: Get all tasks
- `POST /api/v1/tasks`: Create a new task
- `GET /api/v1/tasks/{task_id}`: Get a specific task
- `PUT /api/v1/tasks/{task_id}`: Update a task
- `DELETE /api/v1/tasks/{task_id}`: Delete a task
- `POST /api/v1/tasks/{task_id}/complete`: Mark a task as completed
### Health Check
- `GET /health`: Application health check
## Project Structure
```
taskmanagerapi/
├── alembic/ # Database migrations
│ └── versions/ # Migration scripts
├── app/
│ ├── api/ # API endpoints
│ │ └── routers/ # API route definitions
│ ├── core/ # Core application code
│ ├── crud/ # CRUD operations
│ ├── db/ # Database setup and models
│ ├── models/ # SQLAlchemy models
│ └── schemas/ # Pydantic schemas/models
├── main.py # Application entry point
└── requirements.txt # Project dependencies
```
## Getting Started
### Installation
1. Clone the repository
2. Install dependencies:
```
pip install -r requirements.txt
```
### Running Migrations
```
alembic upgrade head
```
### Starting the Application
```
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