MCPcopy Index your code
hub / github.com/fastapi/fastapi / update_item

Function update_item

docs_src/body_multiple_params/tutorial004_py310.py:20–31  ·  view source on GitHub ↗
(
    *,
    item_id: int,
    item: Item,
    user: User,
    importance: int = Body(gt=0),
    q: str | None = None,
)

Source from the content-addressed store, hash-verified

18
19@app.put("/items/{item_id}")
20async def update_item(
21 *,
22 item_id: int,
23 item: Item,
24 user: User,
25 importance: int = Body(gt=0),
26 q: str | None = None,
27):
28 results = {"item_id": item_id, "item": item, "user": user, "importance": importance}
29 if q:
30 results.update({"q": q})
31 return results

Callers

nothing calls this directly

Calls 1

BodyClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…