Automated Action 7a32d606f3 Create simple todo app with FastAPI and SQLite
- Setup project structure
- Create database models for todos
- Configure SQLite database connection
- Add Alembic migration scripts
- Implement CRUD API endpoints for todos
- Add health check endpoint
- Update README with documentation

generated with BackendIM... (backend.im)
2025-05-13 07:02:29 +00:00

22 lines
428 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 TodoResponse(TodoBase):
id: int
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True
class HealthResponse(BaseModel):
status: str