MCPcopy
hub / github.com/fastapi/fastapi / read_items

Function read_items

docs_src/path_params_numeric_validations/tutorial005_py310.py:7–15  ·  view source on GitHub ↗
(
    *,
    item_id: int = Path(title="The ID of the item to get", gt=0, le=1000),
    q: str,
)

Source from the content-addressed store, hash-verified

5
6@app.get("/items/{item_id}")
7async def read_items(
8 *,
9 item_id: int = Path(title="The ID of the item to get", gt=0, le=1000),
10 q: str,
11):
12 results = {"item_id": item_id}
13 if q:
14 results.update({"q": q})
15 return results

Callers

nothing calls this directly

Calls 1

PathClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…