Summary

We started this chapter by first introducing the concept of an application factory and described some of the benefits and trade-offs of this approach. Next, we used our newly created application factory to set up our first test suite using py.test, which required some modification as to how our application object was created in order to ensure that we obtained a suitable instance that was configured to test scenarios.

Then, we dove headfirst into implementing the basic data models behind a typical web application that contained social features with the ability to follow other users and be followed ourselves. We briefly touched on several main implementation patterns for so-called newsfeed applications and used the simplest version for our ...

Get Flask Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.