register_blueprint() — flask Function Reference
Architecture documentation for the register_blueprint() function in app.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 4e097242_324c_5d02_a967_41ca85d1f371["register_blueprint()"] 38f6d4a2_834e_2acd_e1b6_f45c58079ccd["App"] 4e097242_324c_5d02_a967_41ca85d1f371 -->|defined in| 38f6d4a2_834e_2acd_e1b6_f45c58079ccd fed3f3dd_fb9c_9cc0_fcd6_bb40208b8981["register_blueprint()"] fed3f3dd_fb9c_9cc0_fcd6_bb40208b8981 -->|calls| 4e097242_324c_5d02_a967_41ca85d1f371 fed3f3dd_fb9c_9cc0_fcd6_bb40208b8981["register_blueprint()"] 4e097242_324c_5d02_a967_41ca85d1f371 -->|calls| fed3f3dd_fb9c_9cc0_fcd6_bb40208b8981 style 4e097242_324c_5d02_a967_41ca85d1f371 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/sansio/app.py lines 567–592
def register_blueprint(self, blueprint: Blueprint, **options: t.Any) -> None:
"""Register a :class:`~flask.Blueprint` on the application. Keyword
arguments passed to this method will override the defaults set on the
blueprint.
Calls the blueprint's :meth:`~flask.Blueprint.register` method after
recording the blueprint in the application's :attr:`blueprints`.
:param blueprint: The blueprint to register.
:param url_prefix: Blueprint routes will be prefixed with this.
:param subdomain: Blueprint routes will match on this subdomain.
:param url_defaults: Blueprint routes will use these default values for
view arguments.
:param options: Additional keyword arguments are passed to
:class:`~flask.blueprints.BlueprintSetupState`. They can be
accessed in :meth:`~flask.Blueprint.record` callbacks.
.. versionchanged:: 2.0.1
The ``name`` option can be used to change the (pre-dotted)
name the blueprint is registered with. This allows the same
blueprint to be registered multiple times with unique names
for ``url_for``.
.. versionadded:: 0.7
"""
blueprint.register(self, options)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does register_blueprint() do?
register_blueprint() is a function in the flask codebase, defined in src/flask/sansio/app.py.
Where is register_blueprint() defined?
register_blueprint() is defined in src/flask/sansio/app.py at line 567.
What does register_blueprint() call?
register_blueprint() calls 1 function(s): register_blueprint.
What calls register_blueprint()?
register_blueprint() is called by 1 function(s): register_blueprint.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free