How can I use a value created by an outside program before starting of the flask
run?
If it is not possible then how can a variable which gets assigned in __init__.py
at the start of flask app be used inside files which are registered through blueprint.register
?
Ex:
__init__.py
var1 = "SOMETHING"
routes.py
if var1 = "SOMETHING":
call api1
else
call api2
Basically the question is: How to share variables between __init__.py
and those *.py
files which are connected through blueprint
.