typing-utils
utils to inspect Python type annotations
What it is and what it does
typing-utils is a utility library for inspecting and validating Python type annotations. It provides four main functions: issubtype() checks whether one type is a subtype of another (including support for unions, nested types, and forward references); get_origin() extracts the unsubscripted base of a generic type; get_args() retrieves the type arguments from a parameterized type; and get_type_hints() resolves type hints while handling forward references and optional defaults.
The package was designed as a backport of typing utilities for Python 3.6 and 3.7, but many of its functions now exist in the standard library for Python 3.8+. It has no runtime dependencies and installs cleanly, but development stopped in 2021 and the repository is no longer maintained. Before adopting it, verify whether the standard library or a more actively maintained alternative meets your needs.
Use it for:
- Validate that function argument types conform to expected type hierarchies in runtime type-checking frameworks
- Introspect generic types to extract their origin and arguments for dynamic type processing or serialization
- Resolve forward references in type hints when working with recursive or mutually-referential type definitions
- Support type checking on Python 3.6–3.7 where standard library typing utilities are incomplete
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides utilities to inspect and validate Python type annotations, including functions to check subtype relationships, extract type origins and arguments, and resolve forward references in type hints.
No, unless you are maintaining legacy code on Python 3.6–3.7. For Python 3.8+, use the standard library's typing.get_origin and typing.get_args instead. The package is abandoned (last commit November 2022, no releases since May 2021) and offers no advantages over maintained alternatives or built-in functionality. If you do need it for legacy support, the lack of security vulnerabilities and permissive license make it safe to use, but expect no future maintenance.
Install
typing-utils on PyPI
pip
pip install typing-utilsuv
uv add typing-utilspoetry
poetry add typing-utilsInstalling typing-utils
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last commit was 2022-11-09 and no releases since 2021-05-23. Consider whether its functionality is already available in your target Python version's standard library before adopting.
License in practice
Licensed under Apache License 2.0, a permissive license. You may use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and state significant changes.
Quickstart
pip install typing-utils
from typing_utils import issubtype, get_origin, get_args
import typing
# Check if list is a subtype of typing.Sequence
result = issubtype(list, typing.Sequence)
# Get the origin of a generic type
origin = get_origin(typing.List[int])
# Get type arguments
args = get_args(typing.Dict[str, int])
Requires Python 3.6.1 or later. Many of these utilities are now available in the standard library (typing.get_origin, typing.get_args in Python 3.8+), so check whether you actually need this backport.
Verify before relying
- Whether issubtype handles all edge cases correctly for complex nested and recursive types in production use
- Compatibility with Python versions beyond 3.9 (last tested version in classifiers)
- Whether standard library equivalents in Python 3.8+ make this package redundant for your use case
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.6.1) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,909 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,016,273/month — #4,500 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typing_utils-0.1.0-py3-none-any.whl
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
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
eval-type-backportEnables newer Python typing syntax (like `X |…
permissive · top 1,000 on PyPI
type-enforcedEnforces Python type annotations at runtime…
permissive · top 15,000 on PyPI
typing-inspectProvides runtime inspection utilities for…
permissive · top 1,000 on PyPI
typishTypish provides runtime type checking and…
permissive · top 5,000 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
inspect2Provides the Python 3.6 inspect module API on…
permissive · top 15,000 on PyPI
flake8-type-checkingA flake8 plugin that identifies which imports…
permissive · top 15,000 on PyPI
typing-jsonProvides type-aware JSON serialization and…
permissive · top 15,000 on PyPI
sigtoolsSigtools provides utilities to inspect and…
permissive · top 5,000 on PyPI