PEP 567 Backport
This package implements a backport of Python 3.7 contextvars module (see PEP 567) for Python 3.6.
Important: at this moment this package does not provide an asyncio event loop with PEP 567 support yet. Stay tuned for updates.
Original “contextvars” Package
This package replaces the old “contextvars” PyPI package which repository is available here.
Documentation
Read the official contextvars module documentation here: https://docs.python.org/3.7/library/contextvars.html
PEP 567 also provides a comprehensive overview of the API and explains all design choices.
Installation
$ pip install contextvars
Usage
import contextvars
my_var = contextvars.ContextVar('my_var')
# ...
Listing as a Dependency
The good news is that the standard library always takes the precedence over site packages, so even if a local contextvars module is installed, the one from the standard library will be used. Therefore you can simply list “contextvars” in your requirements.txt or setup.py files.
Another option is to use “platform specific dependencies” setuptools feature:
import setuptools
setuptools.setup(
name="Project",
...
install_requires=[
'contextvars;python_version<"3.7"'
]
)
License
Apache 2.0.
Metadata
Release files for contextvars 2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| contextvars-2.4.tar.gz | 9.6 kB | Without provenance | Details for contextvars-2.4.tar.gz |
Release files / contextvars-2.4.tar.gz
| Download URL | contextvars-2.4.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f38c908aaa59c14335eeea12abea5f443646216c4e29380d7bf34d2018e2c39e
|
|
BLAKE2b-256 checksum How to use checksums |
839655b82d9f13763be9d672622e1b8106c85acb83edd7cc2fa5bc67cd9877e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
|
Security for contextvars 2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.