MCPcopy Index your code
hub / github.com/fastapi/fastapi / read_items

Function read_items

docs_src/query_params_str_validations/tutorial009_py310.py:7–11  ·  view source on GitHub ↗
(q: str | None = Query(default=None, alias="item-query"))

Source from the content-addressed store, hash-verified

5
6@app.get("/items/")
7async def read_items(q: str | None = Query(default=None, alias="item-query")):
8 results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
9 if q:
10 results.update({"q": q})
11 return results

Callers

nothing calls this directly

Calls 1

QueryClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…