File: globals.rst

package info (click to toggle)
quart 0.20.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,888 kB
  • sloc: python: 8,644; makefile: 42; sh: 17; sql: 6
file content (16 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.. _globals:

Globals
=======

As Quart follows the Flask API, it also has globals, specifically
``current_app, g, request, session``. These are globals as they are
likely needed in all request handlers.

Locals
------

As is rather confusing from a naming point of view, the globals are
local to the task being executed. This is detailed from a contextual
view in :ref:`contexts`. This is necessary to ensure that Quart can
asynchronously handle many requests with a single global object.