is_async_gen_callable() — fastapi Function Reference
Architecture documentation for the is_async_gen_callable() function in models.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 8498645e_8d43_5486_147b_baa24cf7fb80["is_async_gen_callable()"] 575d42b6_61a5_5351_210d_0e7a8dd0084f["Dependant"] 8498645e_8d43_5486_147b_baa24cf7fb80 -->|defined in| 575d42b6_61a5_5351_210d_0e7a8dd0084f 8fd8a24b_4153_63d9_a368_0de559b55839["_impartial()"] 8498645e_8d43_5486_147b_baa24cf7fb80 -->|calls| 8fd8a24b_4153_63d9_a368_0de559b55839 1e3f2d0b_134b_ca9f_27b7_1847fce256de["_unwrapped_call()"] 8498645e_8d43_5486_147b_baa24cf7fb80 -->|calls| 1e3f2d0b_134b_ca9f_27b7_1847fce256de style 8498645e_8d43_5486_147b_baa24cf7fb80 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
fastapi/dependencies/models.py lines 132–155
def is_async_gen_callable(self) -> bool:
if self.call is None:
return False # pragma: no cover
if inspect.isasyncgenfunction(
_impartial(self.call)
) or inspect.isasyncgenfunction(_unwrapped_call(self.call)):
return True
if inspect.isclass(_unwrapped_call(self.call)):
return False
dunder_call = getattr(_impartial(self.call), "__call__", None) # noqa: B004
if dunder_call is None:
return False # pragma: no cover
if inspect.isasyncgenfunction(
_impartial(dunder_call)
) or inspect.isasyncgenfunction(_unwrapped_call(dunder_call)):
return True
dunder_unwrapped_call = getattr(_unwrapped_call(self.call), "__call__", None) # noqa: B004
if dunder_unwrapped_call is None:
return False # pragma: no cover
if inspect.isasyncgenfunction(
_impartial(dunder_unwrapped_call)
) or inspect.isasyncgenfunction(_unwrapped_call(dunder_unwrapped_call)):
return True
return False
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does is_async_gen_callable() do?
is_async_gen_callable() is a function in the fastapi codebase, defined in fastapi/dependencies/models.py.
Where is is_async_gen_callable() defined?
is_async_gen_callable() is defined in fastapi/dependencies/models.py at line 132.
What does is_async_gen_callable() call?
is_async_gen_callable() calls 2 function(s): _impartial, _unwrapped_call.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free