I have a object need to share globally in views.py like this:
import stuff
api = Blueprint('app', __name__, template_folder='templates')
shared_object = load_prefix_tree()
@api.route("/")
def index():
.....
which would works as i expected. But i notice that shared_object would load twice after start service. It seems related to the context(application and request) switching. Is there any way to make it only load once cause the shared_object would take about 30 mins to load. Thanks.