skillfed

typing-inspect

Runtime inspection utilities for typing module.

typing-inspect Permissive license MIT AGING 376 v0.9.0 released

Install

typing-inspect on PyPI

pip

pip install typing-inspect

uv

uv add typing-inspect

poetry

poetry add typing-inspect

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — mypy-extensions, typing-extensions, typing
Maintenance aging — 1,177 days since the last release
Last repo commit
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: typing_inspect-0.9.0-py3-none-any.whl

Keywords: typing, function, annotations, type, hints, hinting, checking, checker, typehints, typehinting, typechecking, inspect, reflection, introspection

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development

About typing-inspect

from the package's own PyPI description — quoted content, verbatim

Typing Inspect

Build Status (image)

The typing_inspect module defines experimental API for runtime inspection of types defined in the Python standard typing module. Works with typing version 3.7.4 and later. Example usage:

from typing import Generic, TypeVar, Iterable, Mapping, Union
from typing_inspect import is_generic_type

T = TypeVar('T')

class MyCollection(Generic[T]):
    content: T

assert is_generic_type(Mapping)
assert is_generic_type(Iterable[int])
assert is_generic_type(MyCollection[T])

assert not is_generic_type(int)
assert not is_generic_type(Union[int, T])

Note: The API is still experimental, if you have ideas/suggestions please open an issue on tracker. Currently typing_inspect only supports latest version of typing. This limitation may be lifted if such requests will appear frequently.

Currently provided functions (see functions docstrings for examples of usage): * is_generic_type(tp): Test if tp is a generic type. This includes...

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 runtime inspection utilities for Python's typing module, allowing you to query and decompose type annotations at runtime—testing whether types are generic, callable, unions, literals, and extracting their origins, arguments, and parameters.

Low friction: pure-Python wheel with only three lightweight runtime dependencies. Last release was 2023-05-24; repository is not archived but marked as aging, suggesting stable but not actively developed maintenance.

MIT license (permissive) imposes no significant restrictions; you may use, modify, and distribute this package freely in proprietary or open-source projects with only attribution required.

Usage

from typing import Generic, TypeVar, Mapping
from typing_inspect import is_generic_type

T = TypeVar('T')
class MyCollection(Generic[T]):
    pass

print(is_generic_type(Mapping))  # True
print(is_generic_type(MyCollection[T]))  # True

Verdict: A stable, low-friction utility for runtime type introspection with no known vulnerabilities and permissive MIT licensing. Best suited for projects that need to inspect or decompose type annotations at runtime. Maintenance is aging (last release mid-2023) but the repository remains active; use it where its specific functionality is needed.

Needs verification

  • Whether the experimental API status means breaking changes are possible in future releases despite the stable version number
  • Current compatibility with Python 3.12+ given the latest release predates those versions
  • Whether the three runtime dependencies (mypy-extensions, typing-extensions, typing) introduce any transitive friction
runtime type inspectiontyping module introspectiongeneric type checkingtype annotation reflectionruntime type analysistyping utilitiestype parameter extraction

Similar packages