PyDocs

Concurrent Execution

contextvars

This module provides APIs to manage, store, and access context-local state. The ContextVar class is used to declare and work with Context Variables. The copy_context() function and the Context class should be used to manage the current context in asynchronous frameworks.
Symbols in contextvars

c

Context
A mapping of ContextVars to their values.
ContextVar
This class is used to declare a new Context Variable, e.g.:
copy_context
Returns a copy of the current Context object.

t

Token
Token objects are returned by the ContextVar.set() method.