JelleZijlstra / typeshed_client

Retrieve information from typeshed and other typing stubs
MIT License
20 stars 2 forks source link
pep484 python typeshed typing

This project provides a way to retrieve information from typeshed <https://www.github.com/python/typeshed> and from PEP 561 <https://www.python.org/dev/peps/pep-0561/> stub packages.

Example use cases:

Projects for which typeshed_client could be useful include:

Installation

typeshed_client works on all supported versions of Python. To install it, run python3 -m pip install typeshed_client.

Finding stubs

The typeshed_client.finder module provides functions for finding stub files given a module name.

Functions provided:

Collecting names from stubs

typeshed_client.parser collects the names defined in a stub. It provides:

Resolving names to their definitions

The third component of this package, typeshed_client.resolver, maps names to their definitions, even if those names are defined in other stubs.

To use the resolver, you need to instantiate the typeshed_client.Resolver class. For example, given a resolver = typeshed_client.Resolver(), you can call resolver.get_fully_qualified_name('collections.Set') to retrieve the NameInfo containing the AST node defining collections.Set in typeshed.

Changelog

Version 2.7.0 (July 16, 2024)

Version 2.6.0 (July 12, 2024)

Version 2.5.1 (February 25, 2024)

Version 2.5.0 (February 25, 2024)

Version 2.4.0 (September 29, 2023)

Version 2.3.0 (April 30, 2023)

Version 2.2.0 (January 24, 2023)

Version 2.1.0 (November 5, 2022)

Version 2.0.5 (April 17, 2022)

Version 2.0.4 (March 10, 2022)

Version 2.0.3 (February 2, 2022)

Version 2.0.2 (January 28, 2022)

Version 2.0.1 (January 14, 2022)

Version 2.0.0 (December 22, 2021)

Version 1.2.3 (December 12, 2021)

Version 1.2.2 (December 9, 2021)

Version 1.2.1 (December 9, 2021)

Version 1.2.0 (December 6, 2021)

Version 1.1.4 (December 6, 2021)

Version 1.1.3 (November 14, 2021)

Version 1.1.2 (November 5, 2021)

Version 1.1.1 (July 31, 2021)

Version 1.1.0 (June 24, 2021)

Version 1.0.2 (May 5, 2021)

Version 1.0.1 (April 24, 2021)

Version 1.0.0 (April 11, 2021)

Version 1.0.0rc1 (April 11, 2021)

Version 0.4 (December 2, 2019)

Version 0.3 (November 23, 2019)

Version 0.2 (May 25, 2017)

Version 0.1 (May 4, 2017)