I am trying to access access application configuration inside a blueprint authorisation.py which in a package api. I am initializing the blueprint in __in
authorisation.py
__in
The current_app approach is fine but you must have some request context. If you don't have one (some pre-work like testing, e.g.) you'd better place
current_app
with app.test_request_context('/'):
before this current_app call.
You will have RuntimeError: working outside of application context , instead.
RuntimeError: working outside of application context