_get_signature() — fastapi Function Reference
Architecture documentation for the _get_signature() function in utils.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD fbcdf484_be03_f18c_5e32_2ef21742686c["_get_signature()"] 9e602cbf_3139_86ae_5666_97b8806942de["utils.py"] fbcdf484_be03_f18c_5e32_2ef21742686c -->|defined in| 9e602cbf_3139_86ae_5666_97b8806942de 6a4e43ff_0eba_2bed_5c6f_cda57d19a022["get_typed_signature()"] 6a4e43ff_0eba_2bed_5c6f_cda57d19a022 -->|calls| fbcdf484_be03_f18c_5e32_2ef21742686c 7ee6f7cb_c895_d136_b942_3a323fcab521["get_typed_return_annotation()"] 7ee6f7cb_c895_d136_b942_3a323fcab521 -->|calls| fbcdf484_be03_f18c_5e32_2ef21742686c style fbcdf484_be03_f18c_5e32_2ef21742686c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
fastapi/dependencies/utils.py lines 201–216
def _get_signature(call: Callable[..., Any]) -> inspect.Signature:
if sys.version_info >= (3, 10):
try:
signature = inspect.signature(call, eval_str=True)
except NameError:
# Handle type annotations with if TYPE_CHECKING, not used by FastAPI
# e.g. dependency return types
if sys.version_info >= (3, 14):
from annotationlib import Format
signature = inspect.signature(call, annotation_format=Format.FORWARDREF)
else:
signature = inspect.signature(call)
else:
signature = inspect.signature(call)
return signature
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does _get_signature() do?
_get_signature() is a function in the fastapi codebase, defined in fastapi/dependencies/utils.py.
Where is _get_signature() defined?
_get_signature() is defined in fastapi/dependencies/utils.py at line 201.
What calls _get_signature()?
_get_signature() is called by 2 function(s): get_typed_return_annotation, get_typed_signature.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free