Automated Action 02e8d8dd3e Create Todo Application with FastAPI and SQLite
- Set up project structure with FastAPI
- Create Todo database model with SQLAlchemy
- Add Alembic migrations
- Implement CRUD API endpoints for todos
- Add health endpoint for application monitoring
- Add README with documentation

generated with BackendIM... (backend.im)
2025-05-14 00:44:49 +00:00

32 lines
549 B
Python

from pydantic import BaseModel
from datetime import datetime
from typing import Optional
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 TodoInDBBase(TodoBase):
id: int
created_at: datetime
updated_at: datetime
class Config:
orm_mode = True
class Todo(TodoInDBBase):
pass