opencensus-context
OpenCensus Runtime Context
Install
opencensus-context on PyPI
pip
pip install opencensus-contextuv
uv add opencensus-contextpoetry
poetry add opencensus-contextPackage facts
| License | Apache-2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — contextvars |
| Maintenance | abandoned — 1,471 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: opencensus_context-0.1.3-py2.py3-none-any.whl
About opencensus-context
from the package's own PyPI description — quoted content, verbatim
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 <https://docs.python.org/3/library/contextvars.html>
when available, and in thread local storage <https://docs.python.org/2/library/threading.html#threading.local>
otherwise.
There are cases where you may want to propagate the context explicitly:
Explicit Thread Creation ~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: python
from threading import Thread
from...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
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.
Low friction—pure Python wheel with only contextvars as a runtime dependency. However, the project is archived and unmaintained since August 2022 (1471 days ago), raising concerns about future compatibility and security updates.
Apache-2.0 is permissive and imposes no significant restrictions on use or redistribution, making it suitable for most commercial and open-source projects.
Usage
from opencensus.common.runtime_context import RuntimeContext
from threading import Thread
def work(name):
print(RuntimeContext)
thread = Thread(
target=RuntimeContext.with_current_context(work),
args=('example',),
)
thread.start()
thread.join()
Package is archived and unmaintained; no active support or updates beyond August 2022.
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.
Needs verification
- Whether contextvars backport is required for Python 2.7–3.5 support, or if those versions are no longer tested
- Whether the archived repository will accept security patches or if a maintained fork exists
Similar packages
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-threadingpermissive · top 1,000 on PyPI
asgirefpermissive · top 1,000 on PyPI
threadpoolctlpermissive · top 1,000 on PyPI
watchfilespermissive · top 1,000 on PyPI
multitaskingpermissive · top 1,000 on PyPI
greenletpermissive · top 100 on PyPI
aiofilespermissive · top 1,000 on PyPI
responsespermissive · top 1,000 on PyPI
httpcore2permissive · top 1,000 on PyPI