.. image:: https://travis-ci.org/MagicStack/contextvars.svg?branch=master
:target: https://travis-ci.org/MagicStack/contextvars
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 <https://github.com/gawen/contextvars>`_.
Documentation
=============
Read the official ``contextvars`` module documentation here:
https://docs.python.org/3.7/library/contextvars.html
`PEP 567 <https://www.python.org/dev/peps/pep-0567/>`_ also provides
a comprehensive overview of the API and explains all design choices.
Installation
============
.. code-block:: bash
$ pip install contextvars
Usage
=====
.. code-block:: python
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"
<http://setuptools.readthedocs.io/en/latest/setuptools.html\
#declaring-platform-specific-dependencies>`_ setuptools feature:
.. code-block:: python
import setuptools
setuptools.setup(
name="Project",
...
install_requires=[
'contextvars;python_version<"3.7"'
]
)
License
=======
Apache 2.0.
Raw data
{
"_id": null,
"home_page": "http://github.com/MagicStack/contextvars",
"name": "contextvars",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "MagicStack Inc",
"author_email": "hello@magic.io",
"download_url": "https://files.pythonhosted.org/packages/83/96/55b82d9f13763be9d672622e1b8106c85acb83edd7cc2fa5bc67cd9877e9/contextvars-2.4.tar.gz",
"platform": "",
"description": ".. image:: https://travis-ci.org/MagicStack/contextvars.svg?branch=master\n :target: https://travis-ci.org/MagicStack/contextvars\n\n\nPEP 567 Backport\n================\n\nThis package implements a backport of Python 3.7 ``contextvars``\nmodule (see PEP 567) for Python 3.6.\n\n**Important:** at this moment this package does not provide an\nasyncio event loop with PEP 567 support yet. Stay tuned for updates.\n\n\nOriginal \"contextvars\" Package\n==============================\n\nThis package replaces the old \"contextvars\" PyPI package which\nrepository is available `here <https://github.com/gawen/contextvars>`_.\n\n\nDocumentation\n=============\n\nRead the official ``contextvars`` module documentation here:\nhttps://docs.python.org/3.7/library/contextvars.html\n\n\n`PEP 567 <https://www.python.org/dev/peps/pep-0567/>`_ also provides\na comprehensive overview of the API and explains all design choices.\n\n\nInstallation\n============\n\n.. code-block:: bash\n\n $ pip install contextvars\n\n\nUsage\n=====\n\n.. code-block:: python\n\n import contextvars\n\n my_var = contextvars.ContextVar('my_var')\n\n # ...\n\n\nListing as a Dependency\n=======================\n\nThe good news is that the standard library always takes the\nprecedence over site packages, so even if a local ``contextvars``\nmodule is installed, the one from the standard library will be used.\nTherefore you can simply list \"contextvars\" in your\n``requirements.txt`` or ``setup.py`` files.\n\nAnother option is to use `\"platform specific dependencies\"\n<http://setuptools.readthedocs.io/en/latest/setuptools.html\\\n#declaring-platform-specific-dependencies>`_ setuptools feature:\n\n.. code-block:: python\n\n import setuptools\n\n setuptools.setup(\n name=\"Project\",\n ...\n install_requires=[\n 'contextvars;python_version<\"3.7\"'\n ]\n )\n\n\nLicense\n=======\n\nApache 2.0.",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "PEP 567 Backport",
"version": "2.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "5907c5c866d9ac75563c90b0b7953b04",
"sha256": "f38c908aaa59c14335eeea12abea5f443646216c4e29380d7bf34d2018e2c39e"
},
"downloads": -1,
"filename": "contextvars-2.4.tar.gz",
"has_sig": false,
"md5_digest": "5907c5c866d9ac75563c90b0b7953b04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9570,
"upload_time": "2019-04-01T14:42:11",
"upload_time_iso_8601": "2019-04-01T14:42:11.953652Z",
"url": "https://files.pythonhosted.org/packages/83/96/55b82d9f13763be9d672622e1b8106c85acb83edd7cc2fa5bc67cd9877e9/contextvars-2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2019-04-01 14:42:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "MagicStack",
"github_project": "contextvars",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "contextvars"
}