{"id":18894916,"url":"https://github.com/magicstack/contextvars","last_synced_at":"2025-04-06T19:13:46.512Z","repository":{"id":56825621,"uuid":"126106595","full_name":"MagicStack/contextvars","owner":"MagicStack","description":"PEP 567 Backport","archived":false,"fork":false,"pushed_at":"2019-04-01T14:43:19.000Z","size":16,"stargazers_count":86,"open_issues_count":6,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-26T23:20:16.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MagicStack.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-21T01:40:24.000Z","updated_at":"2023-12-23T14:47:38.000Z","dependencies_parsed_at":"2022-09-19T21:01:16.871Z","dependency_job_id":null,"html_url":"https://github.com/MagicStack/contextvars","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fcontextvars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fcontextvars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fcontextvars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fcontextvars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MagicStack","download_url":"https://codeload.github.com/MagicStack/contextvars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535521,"owners_count":20954576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T08:25:30.053Z","updated_at":"2025-04-06T19:13:46.488Z","avatar_url":"https://github.com/MagicStack.png","language":"Python","readme":".. 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 \u003chttps://github.com/gawen/contextvars\u003e`_.\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 \u003chttps://www.python.org/dev/peps/pep-0567/\u003e`_ 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\u003chttp://setuptools.readthedocs.io/en/latest/setuptools.html\\\n#declaring-platform-specific-dependencies\u003e`_ 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\u003c\"3.7\"'\n        ]\n    )\n\n\nLicense\n=======\n\nApache 2.0.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicstack%2Fcontextvars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicstack%2Fcontextvars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicstack%2Fcontextvars/lists"}