Flask Contexts and Locals
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:
- _request_ctx_stack
- _app_ctx_stack
- current_app
- request
- session
- g