<div dir="ltr">I asked a colleague about some mildly confusing (to me) usage of the name "app". He got it from this tutorial:<br><br><a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world">https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world</a><br><br>Not quite halfway through the blog, he has the reader create an app directory, then an __init__.py file in it containing these lines:<br><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><font face="monospace, monospace">from flask import Flask<br></font><font face="monospace, monospace"><br></font><font face="monospace, monospace">app = Flask(__name__)<br></font><font face="monospace, monospace">from app import views</font></blockquote><div><br></div><div>The author then spends a couple short paragraphs explaining the double-duty done by the name "app" and the atypical import at the end of the module (personally, not where I look first for import statements). This seems odd to me, but if that's the common idiom, I'm happy to go with it. The Flaskr tutorial has a bit different structure. The lack of an __init__.py file suggests that it's written using Python 3. I'm stuck with Python 2 for the foreseeable future, however. Do people use different schemes to setup their application structures? Is there a "best practice" for the application structure?</div><div><br></div><div>Thx,</div><div><br></div><div>Skip Montanaro</div><div><br></div></div>