Automated Action b0d71975a9 Create simple Todo application with FastAPI and SQLite
- Set up project structure with FastAPI and SQLite
- Created Todo model and database schemas
- Implemented CRUD operations for Todo items
- Added Alembic for database migrations
- Added health check endpoint
- Used Ruff for code linting and formatting
- Updated README with project documentation
2025-05-17 13:05:20 +00:00

34 lines
550 B
Python

from datetime import datetime
from typing import Optional
from pydantic import BaseModel
class TodoBase(BaseModel):
title: str
description: Optional[str] = None
completed: bool = False
class TodoCreate(TodoBase):
pass
class TodoUpdate(BaseModel):
title: Optional[str] = None
description: Optional[str] = None
completed: Optional[bool] = None
class TodoInDB(TodoBase):
id: int
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True
class Todo(TodoInDB):
pass