Home / Function/ get_typed_signature() — fastapi Function Reference

get_typed_signature() — fastapi Function Reference

Architecture documentation for the get_typed_signature() function in utils.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  6a4e43ff_0eba_2bed_5c6f_cda57d19a022["get_typed_signature()"]
  9e602cbf_3139_86ae_5666_97b8806942de["utils.py"]
  6a4e43ff_0eba_2bed_5c6f_cda57d19a022 -->|defined in| 9e602cbf_3139_86ae_5666_97b8806942de
  097a7e41_8095_d61f_b849_128514c58040["get_dependant()"]
  097a7e41_8095_d61f_b849_128514c58040 -->|calls| 6a4e43ff_0eba_2bed_5c6f_cda57d19a022
  fbcdf484_be03_f18c_5e32_2ef21742686c["_get_signature()"]
  6a4e43ff_0eba_2bed_5c6f_cda57d19a022 -->|calls| fbcdf484_be03_f18c_5e32_2ef21742686c
  e8e5e486_6061_0953_033a_81c4f70588c1["get_typed_annotation()"]
  6a4e43ff_0eba_2bed_5c6f_cda57d19a022 -->|calls| e8e5e486_6061_0953_033a_81c4f70588c1
  style 6a4e43ff_0eba_2bed_5c6f_cda57d19a022 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fastapi/dependencies/utils.py lines 219–233

def get_typed_signature(call: Callable[..., Any]) -> inspect.Signature:
    signature = _get_signature(call)
    unwrapped = inspect.unwrap(call)
    globalns = getattr(unwrapped, "__globals__", {})
    typed_params = [
        inspect.Parameter(
            name=param.name,
            kind=param.kind,
            default=param.default,
            annotation=get_typed_annotation(param.annotation, globalns),
        )
        for param in signature.parameters.values()
    ]
    typed_signature = inspect.Signature(typed_params)
    return typed_signature

Subdomains

Called By

Frequently Asked Questions

What does get_typed_signature() do?
get_typed_signature() is a function in the fastapi codebase, defined in fastapi/dependencies/utils.py.
Where is get_typed_signature() defined?
get_typed_signature() is defined in fastapi/dependencies/utils.py at line 219.
What does get_typed_signature() call?
get_typed_signature() calls 2 function(s): _get_signature, get_typed_annotation.
What calls get_typed_signature()?
get_typed_signature() is called by 1 function(s): get_dependant.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free