Flask Contexts and Locals

Flask

Flask uses thread locals for its web objects. So, for example, things like the current app, the request, etc. are accessed via a global variable that automatically proxies them - you're always accessing your application, in your thread.

The global variables (context locals) are: