Automated Action cb4f834fc3 Implement complete Task Manager API with FastAPI
- Set up FastAPI application with CORS support
- Created SQLAlchemy models for task management
- Implemented CRUD operations for tasks
- Added database migrations with Alembic
- Created REST API endpoints for task operations
- Added health check endpoint
- Updated README with comprehensive documentation
- Applied code formatting with Ruff
2025-06-19 21:12:16 +00:00

73 lines
1.5 KiB
Markdown

# Task Manager API
A simple task management API built with FastAPI and SQLite.
## Features
- Create, read, update, and delete tasks
- Task status tracking (completed/pending)
- Task priority levels (high, medium, low)
- Automatic timestamps (created_at, updated_at)
- Health check endpoint
- Interactive API documentation
## Installation
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Run database migrations:
```bash
alembic upgrade head
```
3. Start the application:
```bash
uvicorn main:app --reload
```
The API will be available at `http://localhost:8000`
## API Endpoints
### Root
- `GET /` - Get API information and links
### Health Check
- `GET /health` - Check API health status
### Tasks
- `GET /tasks/` - List all tasks
- `POST /tasks/` - Create a new task
- `GET /tasks/{task_id}` - Get a specific task
- `PUT /tasks/{task_id}` - Update a task
- `DELETE /tasks/{task_id}` - Delete a task
## Documentation
- Interactive API documentation: `http://localhost:8000/docs`
- Alternative documentation: `http://localhost:8000/redoc`
- OpenAPI schema: `http://localhost:8000/openapi.json`
## Task Schema
```json
{
"title": "string",
"description": "string (optional)",
"completed": "boolean (default: false)",
"priority": "string (default: 'medium')"
}
```
## Development
This project uses:
- **FastAPI** - Web framework
- **SQLAlchemy** - ORM
- **Alembic** - Database migrations
- **SQLite** - Database
- **Ruff** - Code formatting and linting