How to access app.config in a blueprint?

Use flask.current_app in place of app in the blueprint view.

from flask import current_app

@api.route("/info")
def get_account_num():
    num = current_app.config["INFO"]

The current_app proxy is only available in the context of a request.

Leave a Comment

tech