Since this has been deprecated, use the new attribute instead.
@app.before_request def init(): print("init.")