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

Function get_item

python/starlette/api/routes.py:19–30  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

17
18
19async def get_item(request):
20 item_id = int(request.path_params["item_id"])
21 return JSONResponse(
22 {
23 "item": {
24 "id": item_id,
25 "name": f"Sample Item {item_id}",
26 "value": item_id * 100,
27 },
28 "timestamp": "2024-01-01T00:00:00Z",
29 }
30 )
31
32
33api_routes = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected