{"library":"contextvars","type":"library","category":null,"description":"The `contextvars` library is a backport of the standard library `contextvars` module (introduced in Python 3.7 via PEP 567), providing APIs to manage, store, and access context-local state. It enables task-local variables in asynchronous code, ensuring data isolation across different coroutines or threads without explicit argument passing. The current version is 2.4, and it typically releases on demand for bug fixes or dependency updates.","language":"python","status":"active","version":"2.4","tags":["async","concurrency","context","asyncio","threading","backport"],"last_verified":"Thu May 21","install":[{"cmd":"pip install contextvars","imports":["from contextvars import ContextVar","from contextvars import copy_context","from contextvars import current_context","from contextvars import Token"]}],"homepage":null,"github":"http://github.com/MagicStack/contextvars","docs":null,"changelog":null,"pypi":"https://pypi.org/project/contextvars/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.5,"avg_import_s":0,"wheel_type":"sdist"},"url":"https://checklist.day/v1/registry/contextvars/compatibility"}}