Blueprints 101
So far, our applications have all been flat: beautiful, single-file Web applications (templates and static resources not considered). In some cases, that's a nice approach; a reduced need for imports, easy to maintain with simple editors and all but…
As our applications grow, we identify the need to contextually arrange our code. Flask Blueprints allow you to modularize your project, sharding your views in "app-like" objects called blueprints that can be later loaded and exposed by your Flask application. Large applications benefit deeply from the use of blueprints, as the code gets more organized.
Feature-wise, it also helps you configure the registered view access and resource lookup in a more monolithic way. Tests, models, templates and static resources can be sorted by blueprint, making your code so much more maintainable. If you're familiar with Django, think of blueprints as Django apps. This way, a registered blueprint has access to the application config and may be registered...