match_request() — flask Function Reference
Architecture documentation for the match_request() function in ctx.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 5f896cf4_e98f_e9ed_264e_d22af8ed8eec["match_request()"] 86817dcd_97b5_9a9f_aee8_5fa78b4cecc9["AppContext"] 5f896cf4_e98f_e9ed_264e_d22af8ed8eec -->|defined in| 86817dcd_97b5_9a9f_aee8_5fa78b4cecc9 519276e3_fb95_dd4f_f8b0_6550aeb8f81b["push()"] 519276e3_fb95_dd4f_f8b0_6550aeb8f81b -->|calls| 5f896cf4_e98f_e9ed_264e_d22af8ed8eec style 5f896cf4_e98f_e9ed_264e_d22af8ed8eec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/ctx.py lines 398–407
def match_request(self) -> None:
"""Apply routing to the current request, storing either the matched
endpoint and args, or a routing exception.
"""
try:
result = self.url_adapter.match(return_rule=True) # type: ignore[union-attr]
except HTTPException as e:
self._request.routing_exception = e # type: ignore[union-attr]
else:
self._request.url_rule, self._request.view_args = result # type: ignore[union-attr]
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does match_request() do?
match_request() is a function in the flask codebase, defined in src/flask/ctx.py.
Where is match_request() defined?
match_request() is defined in src/flask/ctx.py at line 398.
What calls match_request()?
match_request() is called by 1 function(s): push.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free