python-flask
python-flask copied to clipboard
Possibility to call init_app
Seems like the plugin does not support deferred app initialization like other plugins do.
To avoid any cyclic imports in the app it would be great to have init_app method which takes an app as a parameter. Sometimes it's not that easy to initialize a tracer with modular layout. The documentation has no mention about the usage with flask app factory pattern.
Example
plugins.py
tracer = FlaskTracer()
app.py
from plugins import tracer
def create_app():
app = Flask()
tracer.init_app(app)
return app
Hey @pydrive
Thanks for the info. I will work on this item before we do the eventual release of the 1.0 version (already in the works ;) )
Thanks for the response, @carlosalberto. I'll watch for changes in the thread!