typeshed-client
A library for accessing stubs in typeshed.
What it is and what it does
typeshed_client is a library for programmatically accessing type stubs from typeshed and PEP 561 stub packages. It provides three main capabilities: finding stub files by module name, parsing stubs to extract defined names and their metadata (including whether they are exported), and resolving names to their definitions even when those definitions span multiple stub files.
The package bundles a copy of typeshed and exposes it through a SearchContext API that lets you customize which typeshed version to use, which search paths to query, and how to interpret version and platform checks in stubs. It's designed for tools that need to inspect type annotations at runtime or build time—static analyzers, stub validators, and introspection tools—rather than for end-user type checking.
Use it for:
- Static type checkers and linters that need to resolve type definitions from typeshed stubs.
- Tools that validate or lint stub files for correctness and completeness.
- Documentation generators that extract type information from stubs for rendering.
- Runtime introspection tools that need to query what names are exported from a typed module.
- IDE plugins or language servers that resolve stub definitions for hover and goto-definition features.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Retrieves stub file paths, AST nodes, and exported names from typeshed and PEP 561 stub packages, enabling programmatic access to type annotations.
Yes. Low install friction, permissive license, active maintenance, no vulnerabilities, and a clear use case for tools that need programmatic access to typeshed. Install if you're building a static analyzer, stub validator, or type introspection tool; skip if you only need type checking for your own code.
Install
typeshed-client on PyPI
pip
pip install typeshed-clientuv
uv add typeshed-clientpoetry
poetry add typeshed-clientInstalling typeshed-client
Before you install
Low friction: single runtime dependency (typing-extensions), pure Python wheel, actively maintained with releases every few weeks. Last commit 2026-08-03, no known vulnerabilities.
License in practice
MIT license (permissive) — you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install typeshed_client
from typeshed_client import get_stub_file, get_stub_names
stub_path = get_stub_file('typing')
names = get_stub_names('collections')
Verify before relying
- Whether the bundled typeshed version is kept current with the main typeshed repository
- Performance characteristics when resolving names across large stub hierarchies
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,992,949/month — #3,376 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typeshed_client-2.13.0-py3-none-any.whl
Keywords: typeshed, typing, annotations
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-typed-astProvides type stubs for the typed-ast package,…
permissive · top 15,000 on PyPI
docutils-stubsProvides PEP 561 type stubs for docutils,…
permissive · top 15,000 on PyPI
types-beautifulsoup4Provides type hints for beautifulsoup4 code via…
permissive · top 5,000 on PyPI
types-PillowProvides type stubs for Pillow, enabling static…
permissive · top 5,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
types-certifiProvides type stubs for the certifi package to…
permissive · top 1,000 on PyPI
types-attrsProvides PEP 561 type stubs for the attrs…
permissive · top 15,000 on PyPI
types-clickProvides PEP 561 type stubs for the click…
permissive · top 5,000 on PyPI
flake8-pyiA Flake8 plugin that lints Python type stub…
permissive · top 5,000 on PyPI
angr-dataProvides bundled data files—function and type…
permissive · top 15,000 on PyPI