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

Function get_item

python/flask/endpoints/routes.py:23–33  ·  view source on GitHub ↗
(item_id: int)

Source from the content-addressed store, hash-verified

21
22@api_bp.get("/api/items/<int:item_id>")
23def get_item(item_id: int):
24 return jsonify(
25 {
26 "item": {
27 "id": item_id,
28 "name": f"Sample Item {item_id}",
29 "value": item_id * 100,
30 },
31 "timestamp": "2024-01-01T00:00:00Z",
32 }
33 )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected