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

Function read_heroes

docs_src/sql_databases/tutorial001_py310.py:45–51  ·  view source on GitHub ↗
(
    session: Session = Depends(get_session),
    offset: int = 0,
    limit: int = Query(default=100, le=100),
)

Source from the content-addressed store, hash-verified

43
44@app.get("/heroes/")
45def read_heroes(
46 session: Session = Depends(get_session),
47 offset: int = 0,
48 limit: int = Query(default=100, le=100),
49) -> list[Hero]:
50 heroes = session.exec(select(Hero).offset(offset).limit(limit)).all()
51 return heroes
52
53
54@app.get("/heroes/{hero_id}")

Callers

nothing calls this directly

Calls 2

DependsClass · 0.90
QueryClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…