So far in this chapter, we've looked at how Flask works, and at most of the built-in features it provides--and we will be using them throughout this book.
One topic we have not covered yet is how to organize the code in your projects, and how to instantiate your Flask app. Every example so far used a single Python module and the app.run() call to run the service.
Having everything in a module is, of course, a terrible idea unless your code is just a few lines. And since we will want to release and deploy the code, it's better to have it inside a Python package so that we can use standard packaging tools like Pip and Setuptools.
It's also a good idea to organize views into blueprints, and have one module per blueprint.
Lastly, the run() call can be removed from the code, since Flask provides a generic runner that looks for an app variable...