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

Function read_heroes

docs_src/sql_databases/tutorial001_an_py310.py:49–55  ·  view source on GitHub ↗
(
    session: SessionDep,
    offset: int = 0,
    limit: Annotated[int, Query(le=100)] = 100,
)

Source from the content-addressed store, hash-verified

47
48@app.get("/heroes/")
49def read_heroes(
50 session: SessionDep,
51 offset: int = 0,
52 limit: Annotated[int, Query(le=100)] = 100,
53) -> list[Hero]:
54 heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()
55 return heroes
56
57
58@app.get("/heroes/{hero_id}")

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…