MCPcopy
hub / github.com/ormar-orm/ormar / get_item

Function get_item

docs_src/fastapi/docs001.py:47–49  ·  view source on GitHub ↗
(item_id: int, item: Item)

Source from the content-addressed store, hash-verified

45
46@app.put("/items/{item_id}")
47async def get_item(item_id: int, item: Item):
48 item_db = await Item.objects.get(pk=item_id)
49 return await item_db.update(**item.model_dump())
50
51
52@app.delete("/items/{item_id}")

Callers

nothing calls this directly

Calls 3

model_dumpMethod · 0.80
getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected