Home / Function/ run_endpoint_function() — fastapi Function Reference

run_endpoint_function() — fastapi Function Reference

Architecture documentation for the run_endpoint_function() function in routing.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  0f69147d_dc63_05c7_c9b3_7b83bf622c75["run_endpoint_function()"]
  de395a51_26f8_3424_1af0_2f5bef39c893["routing.py"]
  0f69147d_dc63_05c7_c9b3_7b83bf622c75 -->|defined in| de395a51_26f8_3424_1af0_2f5bef39c893
  ad8d62d9_53da_514b_c06f_53293eb1e5ae["get_request_handler()"]
  ad8d62d9_53da_514b_c06f_53293eb1e5ae -->|calls| 0f69147d_dc63_05c7_c9b3_7b83bf622c75
  style 0f69147d_dc63_05c7_c9b3_7b83bf622c75 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fastapi/routing.py lines 306–316

async def run_endpoint_function(
    *, dependant: Dependant, values: dict[str, Any], is_coroutine: bool
) -> Any:
    # Only called by get_request_handler. Has been split into its own function to
    # facilitate profiling endpoints, since inner functions are harder to profile.
    assert dependant.call is not None, "dependant.call must be a function"

    if is_coroutine:
        return await dependant.call(**values)
    else:
        return await run_in_threadpool(dependant.call, **values)

Domain

Subdomains

Defined In

Frequently Asked Questions

What does run_endpoint_function() do?
run_endpoint_function() is a function in the fastapi codebase, defined in fastapi/routing.py.
Where is run_endpoint_function() defined?
run_endpoint_function() is defined in fastapi/routing.py at line 306.
What calls run_endpoint_function()?
run_endpoint_function() is called by 1 function(s): get_request_handler.

Analyze Your Own Codebase

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

Try Supermodel Free