Blueprint Registration (Flask)
Blueprint registration is the step where you attach a Blueprint to your Flask app with app.register_blueprint(bp). Until you register it, its routes are not active. Registration can add a url_prefix or subdomain to every route in the blueprint.
Flask
Defining a Blueprint only describes a group of routes; registering it is what wires those routes into the live URL map. You typically register all blueprints inside the application factory after the app is created.
The register call accepts options that apply to the whole group: url_prefix='/admin' prepends to every route, subdomain='api' scopes it to a subdomain, and you can register the same blueprint multiple times with different prefixes for reuse.
A common mistake is forgetting to register a blueprint, which leaves its pages returning 404 even though the code looks correct. Another is a url_for that omits the blueprint name, since registered routes are namespaced as 'blueprintname.viewname'.
Syntax
app.register_blueprint(bp, url_prefix="/admin")Examples
Python
from .admin import admin_bp
from .blog import blog_bp
def create_app():
app = Flask(__name__)
app.register_blueprint(admin_bp, url_prefix="/admin")
app.register_blueprint(blog_bp)
return app