fastapi-crud-api/app/models.py
root 67d8c6bf30 feat: add FastAPI example project with CRUD API
- Add FastAPI application with health check and item CRUD endpoints
- Add Pydantic models for request/response validation
- Add pytest test suite with 5 passing tests
- Add project documentation and run script

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 08:25:34 +08:00

13 lines
247 B
Python

from pydantic import BaseModel
from typing import Optional
class Item(BaseModel):
id: Optional[int] = None
name: str
description: Optional[str] = None
class ItemCreate(BaseModel):
name: str
description: Optional[str] = None