typing-inspect
Runtime inspection utilities for typing module.
Decision gist · record as of 2026-08-14
Yes, if you need runtime type introspection for the typing module. The package is lightweight, has no known vulnerabilities, and carries a permissive MIT license. However, be aware that it is marked experimental and aging (last release over 1178 days ago), and it only supports the latest version of typing—not backported versions. Suitable for stable, well-scoped use cases; less suitable if you need active maintenance or support for older typing versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires typing version 3.7.4 or later; API is experimental and only supports the latest version of typing.
- Low install friction with a pure-Python wheel.
- Maintenance is aging—last release was 2023-05-24, over 1178 days ago—but the repository remains active and unarchived with modest community engagement (376 stars).
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2023-05-24 (1178 days) · last repo commit 2026-01-18 · 376 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 88,348,693 downloads/mo, #386 on PyPI
Alternatives
Verify before relying
pip install typing-inspect
from typing import Generic, TypeVar, Mapping
from typing_inspect import is_generic_type
T = TypeVar('T')
class MyCollection(Generic[T]):
pass
assert is_generic_type(Mapping)
assert is_generic_type(MyCollection[T])- Whether the experimental API is stable enough for production use despite the 'Alpha' development status.
- Compatibility with Python versions beyond those explicitly listed (3.5–3.11, 2.7) given the 'unspecified' python_support field.
- Performance characteristics when inspecting deeply nested or complex generic types.
What it is and what it does
typing_inspect is a runtime introspection library for Python's typing module. It provides a set of utility functions to query and analyze type annotations at runtime—determining whether a type is generic, callable, a union, optional, literal, or a TypeVar, and extracting origin types, type arguments, and parameters. This is useful when you need to programmatically inspect type hints in your code rather than just declare them.
The package depends on mypy-extensions and typing-extensions alongside the standard typing module. It is marked as experimental and currently only supports the latest version of typing. The library is most useful in frameworks, type checkers, or introspection tools that need to reason about type annotations dynamically.
Use it for
- Inspect generic types in a framework to validate or route based on type parameters at runtime.
- Extract type arguments from Union or Optional types to implement conditional logic in decorators or middleware.
- Determine whether a function parameter is a TypeVar or Literal type to guide serialization or validation logic.
- Analyze TypedDict keys and their types for dynamic form generation or API schema construction.
- Build type-aware introspection tools or debugging utilities that need to reason about type hints.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need runtime type introspection for the typing module.
The package is lightweight, has no known vulnerabilities, and carries a permissive MIT license. However, be aware that it is marked experimental and aging (last release over 1178 days ago), and it only supports the latest version of typing—not backported versions. Suitable for stable, well-scoped use cases; less suitable if you need active maintenance or support for older typing versions.
Install
typing-inspect on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance is aging—last release was 2023-05-24, over 1178 days ago—but the repository remains active and unarchived with modest community engagement (376 stars). Suitable for stable, well-defined use cases.
Requires typing version 3.7.4 or later; API is experimental and only supports the latest version of typing.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install typing-inspect
from typing import Generic, TypeVar, Mapping
from typing_inspect import is_generic_type
T = TypeVar('T')
class MyCollection(Generic[T]):
pass
assert is_generic_type(Mapping)
assert is_generic_type(MyCollection[T])
Verify before relying
- Whether the experimental API is stable enough for production use despite the 'Alpha' development status.
- Compatibility with Python versions beyond those explicitly listed (3.5–3.11, 2.7) given the 'unspecified' python_support field.
- Performance characteristics when inspecting deeply nested or complex generic types.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesmypy-extensionstyping-extensionstyping |
| Maintenance | Aging 1,178 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 88,348,693 / month, #386 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | 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 |
Evidence: typing_inspect-0.9.0-py3-none-any.whl
Tags
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 › “typing module introspection”
- typing-inspectProvides runtime inspection utilities for Python's typing module,…
- typishTypish provides runtime type checking and introspection functions for…
- typeapiProvides a unified API for reflecting and introspecting Python type…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
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.
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.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
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.
See also pyre-extensions · typing-inspection · typing-utils · typish · named · inspect2 · typing · nameof · typeapi · type-enforced