skillfed

typeshed-client

A library for accessing stubs in typeshed.

typeshed-client v2.13.0 2.0M downloads/30d#3,376 on PyPI31
Permissive license MIT Active released

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-client

uv

uv add typeshed-client

poetry

poetry add typeshed-client

Installing 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

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development

Tags

typeshed stub file lookupaccess type annotations programmaticallyfind stub definitionstypeshed parser and resolverPEP 561 stub introspectionresolve type stubs to ASTextract names from stubs
type-stubstypeshedast-parsing

More Software Development packages