- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for create_author_items (0.06 seconds)
-
docs_src/dataclasses_/tutorial003_py310.py
@dataclass class Author: name: str items: list[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: list[Item]): # (5) return {"name": author_id, "items": items} # (6) @app.get("/authors/", response_model=list[Author]) # (7) def get_authors(): # (8) return [ # (9)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.3K bytes - Click Count (0)