--- id: opencensus-context version: "0.1.3" license: Apache-2.0 license_treatment: permissive maintenance: abandoned --- # opencensus-context — OpenCensus Runtime Context License: permissive · Maintenance: abandoned · Popularity: top 1,000 on PyPI ## Install pip install opencensus-context uv add opencensus-context poetry add opencensus-context ## Description OpenCensus Runtime Context ============================================================================ |pypi| .. |pypi| image:: https://badge.fury.io/py/opencensus-context.svg :target: https://pypi.org/project/opencensus-context/ The **OpenCensus Runtime Context** provides in-process context propagation. By default, ``thread local storage`` is used for Python 2.7, 3.4 and 3.5; ``contextvars`` is used for Python >= 3.6, which provides ``asyncio`` support. Installation ------------ This library is installed by default with ``opencensus``, there is no need to install it explicitly. Usage ----- In most cases context propagation happens automatically within a process, following the control flow of threads and asynchronous coroutines. The runtime context is a dictionary stored in a `context variable `_ when available, and in `thread local storage `_ otherwise. There are cases where you may want to propagate the context explicitly: Explicit Thread Creation ~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python from threading import Thread from... ## AI interpretation — verify before relying Provides in-process context propagation for distributed tracing, using contextvars for Python 3.6+ and thread-local storage for earlier versions to enable automatic context flow across threads and async coroutines. Verdict: opencensus-context is a lightweight, dependency-minimal context propagation utility with permissive licensing, but its abandoned status (archived repository, no releases since August 2022) makes it risky for new projects. Suitable only if already locked into an existing opencensus deployment or if you can accept no upstream maintenance. [View on SkillFed](https://skillfed.io/packages/opencensus-context) · [View on PyPI](https://pypi.org/project/opencensus-context/)