Patterns for Flask

Certain features and interactions are common enough that you will findthem in most web applications. For example, many applications use arelational database and user authentication. They will open a databaseconnection at the beginning of the request and get the information forthe logged in user. At the end of the request, the database connectionis closed.

These types of patterns may be a bit outside the scope of Flask itself,but Flask makes it easy to implement them. Some common patterns arecollected in the following pages.