I am using flask and trying to the following.
I have defined a main.py file through which I want to run my app ie python main.py -
from flask import Fla
You can import current_app from flask. It stores a reference to the global application object.
from flask import current_app as app def home(): return render_template('base.html', name=app.name)