Automated Action 0d6888d900 Add Task Manager API with FastAPI and SQLite
- Created comprehensive task management system with CRUD operations
- Implemented SQLAlchemy models and database configuration
- Added Alembic migrations for database schema management
- Created FastAPI endpoints for task management with proper validation
- Added health check endpoint and base URL information
- Configured CORS middleware and OpenAPI documentation
- Updated README with comprehensive API documentation
- Code formatted and linted with Ruff
2025-07-07 20:49:13 +00:00

33 lines
664 B
Python

from datetime import datetime
from typing import Optional
from pydantic import BaseModel
class TaskBase(BaseModel):
title: str
description: Optional[str] = None
completed: bool = False
priority: str = "medium"
due_date: Optional[datetime] = None
class TaskCreate(TaskBase):
pass
class TaskUpdate(BaseModel):
title: Optional[str] = None
description: Optional[str] = None
completed: Optional[bool] = None
priority: Optional[str] = None
due_date: Optional[datetime] = None
class TaskResponse(TaskBase):
id: int
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True