Home / Function/ dispatch_request() — flask Function Reference

dispatch_request() — flask Function Reference

Architecture documentation for the dispatch_request() function in views.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  2fffccf8_7bc5_c4b1_1066_6d5aeba834fa["dispatch_request()"]
  3a099be0_ce36_e4ca_abd6_9bb88317cf79["MethodView"]
  2fffccf8_7bc5_c4b1_1066_6d5aeba834fa -->|defined in| 3a099be0_ce36_e4ca_abd6_9bb88317cf79
  1dc2aad4_ad6c_f72a_12e6_6176ee94ff61["dispatch_request()"]
  1dc2aad4_ad6c_f72a_12e6_6176ee94ff61 -->|calls| 2fffccf8_7bc5_c4b1_1066_6d5aeba834fa
  1dc2aad4_ad6c_f72a_12e6_6176ee94ff61["dispatch_request()"]
  2fffccf8_7bc5_c4b1_1066_6d5aeba834fa -->|calls| 1dc2aad4_ad6c_f72a_12e6_6176ee94ff61
  style 2fffccf8_7bc5_c4b1_1066_6d5aeba834fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/flask/views.py lines 182–191

    def dispatch_request(self, **kwargs: t.Any) -> ft.ResponseReturnValue:
        meth = getattr(self, request.method.lower(), None)

        # If the request method is HEAD and we don't have a handler for it
        # retry with GET.
        if meth is None and request.method == "HEAD":
            meth = getattr(self, "get", None)

        assert meth is not None, f"Unimplemented method {request.method!r}"
        return current_app.ensure_sync(meth)(**kwargs)  # type: ignore[no-any-return]

Subdomains

Defined In

Called By

Frequently Asked Questions

What does dispatch_request() do?
dispatch_request() is a function in the flask codebase, defined in src/flask/views.py.
Where is dispatch_request() defined?
dispatch_request() is defined in src/flask/views.py at line 182.
What does dispatch_request() call?
dispatch_request() calls 1 function(s): dispatch_request.
What calls dispatch_request()?
dispatch_request() is called by 1 function(s): dispatch_request.

Analyze Your Own Codebase

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

Try Supermodel Free