$npx skillfedfor your agent

types-contextvars

Typing stubs for contextvars

With conditionsPyPI Software DevelopmentReleased Jul 2023222.9K downloads / moApache-2.0 licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — types_contextvars-2.4.7.3-py3-none-any.whl
v2.4.7.3 · released 2023-07-07

Yes, if you use contextvars and need type checking with mypy, pyright, or pytype on Python versions up to those tested. However, be aware that the package is unmaintained—if you are on a newer Python version or type-checker version than those listed, the stubs may become inaccurate. For modern Python (3.7+), consider whether your type checker already includes contextvars stubs inline before installing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • This package is only useful when running a static type checker (mypy, pyright, pytype, or IDE type checking); it provides no runtime functionality.
  • Low friction installation as a pure-Python stub package with no runtime dependencies.
  • However, the package is explicitly unmaintained and has not been updated since July 2023, so it will not receive fixes for new Python versions or type-checking tool changes.

License · maintenance · safety

Apache-2.0 license (permissive) — Licensed under Apache-2.0, a permissive open-source license that allows free use, modification, and distribution with minimal restrictions, making it safe to include in most projects.

last release 2023-07-07 (1134 days) · last repo commit 2026-08-14 · 5,108 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 222,896 downloads/mo, #9,256 on PyPI

Verify before relying

pip install types-contextvars

# Then use in your code with type checking enabled:
import contextvars

my_var: contextvars.ContextVar[str] = contextvars.ContextVar('my_var')
  • Whether the stubs remain accurate for contextvars in current Python versions beyond those tested (mypy 1.4.1, pyright 1.1.316, pytype 2023.6.16)
  • Whether unmaintained status will cause compatibility issues as type checkers evolve
Same gist for agents: .md · .json

What it is and what it does

types-contextvars is a PEP 561 type stub package that supplies type annotations for Python's built-in contextvars module. It allows static type checkers and IDEs to understand the types and signatures of contextvars functions and classes, enabling developers to catch type errors during development rather than at runtime.

The package is generated from typeshed and was last tested with mypy 1.4.1, pyright 1.1.316, and pytype 2023.6.16. It has no runtime dependencies and installs as a pure-Python wheel. However, the package is explicitly unmaintained and will not receive updates, so its accuracy may drift as Python and type-checking tools evolve.

Use it for

  • Enable mypy or pyright to type-check code that uses contextvars.ContextVar for thread-safe context storage
  • Provide IDE autocomplete and type hints when working with context variables in modern Python projects
  • Validate type safety in async frameworks that rely on contextvars for managing request-scoped state
  • Support legacy projects still using older type-checking tool versions that require explicit stubs

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use contextvars and need type checking with mypy, pyright, or pytype on Python versions up to those tested.

However, be aware that the package is unmaintained—if you are on a newer Python version or type-checker version than those listed, the stubs may become inaccurate. For modern Python (3.7+), consider whether your type checker already includes contextvars stubs inline before installing.

Install

types-contextvars on PyPI

Before you install

Low friction installation as a pure-Python stub package with no runtime dependencies. However, the package is explicitly unmaintained and has not been updated since July 2023, so it will not receive fixes for new Python versions or type-checking tool changes.

This package is only useful when running a static type checker (mypy, pyright, pytype, or IDE type checking); it provides no runtime functionality.

License in practice

Licensed under Apache-2.0, a permissive open-source license that allows free use, modification, and distribution with minimal restrictions, making it safe to include in most projects.

Quickstart

pip install types-contextvars

# Then use in your code with type checking enabled:
import contextvars

my_var: contextvars.ContextVar[str] = contextvars.ContextVar('my_var')

Verify before relying

  • Whether the stubs remain accurate for contextvars in current Python versions beyond those tested (mypy 1.4.1, pyright 1.1.316, pytype 2023.6.16)
  • Whether unmaintained status will cause compatibility issues as type checkers evolve

Package facts

LicenseApache-2.0 license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 1,134 days since the last release
Last repo commit
First released
Downloads222,896 / month, #9,256 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Typing :: Stubs Only

Evidence: types_contextvars-2.4.7.3-py3-none-any.whl

Tags

Capabilities
contextvars type stubstyping stubs for contextvarsmypy contextvars typesstatic type checking context variablesPEP 561 type stubspyright contextvars support
Topics
type-stubsunmaintained

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “contextvars type stubs”

  • types-contextvarsProvides type stubs for Python's contextvars module, enabling static…
  • contextvarsProvides the PEP 567 contextvars module for Python 3.6, enabling…
  • aiocontextvarsProvides asyncio support for the contextvars backport library on…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also types-typed-ast · types-appdirs · contextvars · types-DateTimeRange · aiocontextvars · types-urllib3 · types-dataclasses · pytype · types-babel · types-futures