MCPcopy Create free account
hub / github.com/fastapi/fastapi / dependency_b

Function dependency_b

docs_src/dependencies/tutorial008_an_py310.py:14–19  ·  view source on GitHub ↗
(dep_a: Annotated[DepA, Depends(dependency_a)])

Source from the content-addressed store, hash-verified

12
13
14async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]):
15 dep_b = generate_dep_b()
16 try:
17 yield dep_b
18 finally:
19 dep_b.close(dep_a)
20
21
22async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):

Callers

nothing calls this directly

Calls 2

DependsClass · 0.90
closeMethod · 0.45

Tested by

no test coverage detected