blueprint() — flask Function Reference
Architecture documentation for the blueprint() function in wrappers.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 53d45141_828e_ea9a_7cbc_ddf952818e95["blueprint()"] eae007fa_ef39_ed97_113d_df4ad5001c0e["Request"] 53d45141_828e_ea9a_7cbc_ddf952818e95 -->|defined in| eae007fa_ef39_ed97_113d_df4ad5001c0e cd857c6c_da43_da88_26ed_c88b074b880a["preprocess_request()"] cd857c6c_da43_da88_26ed_c88b074b880a -->|calls| 53d45141_828e_ea9a_7cbc_ddf952818e95 style 53d45141_828e_ea9a_7cbc_ddf952818e95 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/wrappers.py lines 162–178
def blueprint(self) -> str | None:
"""The registered name of the current blueprint.
This will be ``None`` if the endpoint is not part of a
blueprint, or if URL matching failed or has not been performed
yet.
This does not necessarily match the name the blueprint was
created with. It may have been nested, or registered with a
different name.
"""
endpoint = self.endpoint
if endpoint is not None and "." in endpoint:
return endpoint.rpartition(".")[0]
return None
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does blueprint() do?
blueprint() is a function in the flask codebase, defined in src/flask/wrappers.py.
Where is blueprint() defined?
blueprint() is defined in src/flask/wrappers.py at line 162.
What calls blueprint()?
blueprint() is called by 1 function(s): preprocess_request.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free