MCPcopy
hub / github.com/fastapi/fastapi / function_scope

Function function_scope

tests/test_dependency_yield_scope.py:80–84  ·  view source on GitHub ↗
(session: SessionFuncDep)

Source from the content-addressed store, hash-verified

78
79@app.get("/function-scope")
80def function_scope(session: SessionFuncDep) -> Any:
81 def iter_data():
82 yield json.dumps({"is_open": session.open})
83
84 return StreamingResponse(iter_data())
85
86
87@app.get("/request-scope")

Callers

nothing calls this directly

Calls 1

iter_dataFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…