MCPcopy Create free account
hub / github.com/vercel/examples / get_item

Function get_item

python/fastapi/main.py:26–34  ·  view source on GitHub ↗
(item_id: int)

Source from the content-addressed store, hash-verified

24
25@app.get("/api/items/{item_id}")
26def get_item(item_id: int):
27 return {
28 "item": {
29 "id": item_id,
30 "name": "Sample Item " + str(item_id),
31 "value": item_id * 100
32 },
33 "timestamp": "2024-01-01T00:00:00Z"
34 }
35
36
37@app.get("/", response_class=HTMLResponse)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected