When you learn Flask, you are told to create your Flask application instances by passing
__name__ as the first argument to the
Flask class. Most developers do this without thinking, and without knowing what it achieves.
In this article we are going to look at
Flask(__name__) in depth. By the end you will not only have a full understanding of this pattern, but you will also know when to deviate from it and pass other values.