Patrick's Software Blog

Understanding the Application and Request Contexts in Flask

Notebook on a table with the Flask log on the side and a Learning Plan in the notebook listing the Application Context and Request Context.

Introduction

This blog post provides an introduction to the Application Context and Request Context in Flask. The key concepts covered are:

  • How Flask handles the request object and how this differs from other web frameworks
  • What the application and request context are
  • Which data is stored in both the Application and Request contexts

The full article can be found on TestDriven.io: https://testdriven.io/blog/flask-contexts/