__init__.py
file under the package folder where you declare all the global variables that you need to share between the classes. Then, you should add the code "app = Flask(__name__)
" in the __init__.py
file. Now you can share and use the app variables anywhere if you just import the package name.