O'Reilly logo

Building Web Applications with Flask by Italo Maia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required