pynetdicom._config.PASS_CONTEXTVARS¶
- pynetdicom._config.PASS_CONTEXTVARS: bool = False¶
Pass context-local state to concurrent pynetdicom code.
Added in version 2.0.
If
True
, then anycontextvars.ContextVar
instances defined in the calling context will be made available to pynetdicom’s concurrent contexts. This allows the caller to define contextual behavior without modifying pynetdicom. For example, one could add a logging filter to the pynetdicom logger that references an externally definedcontextvars.ContextVar
.Default:
False
Examples
>>> from pynetdicom import _config >>> _config.PASS_CONTEXTVARS = True