typing
Type Hints for Python
What it is and what it does
This package backports Python's standard library typing module to older Python versions (2.7 and 3.4) that predate its introduction in Python 3.5. It enables developers to use type annotations and hints—a standard notation for documenting function and variable types—on legacy Python versions, allowing static type checkers, IDEs, and other tools to analyze code for type correctness.
On Python 3.5 and later, installing this package has no effect because the standard library's typing module takes precedence. The package is intended primarily for projects that must support very old Python versions. For modern projects, the stdlib typing module is always available and receives updates with each Python release.
Use it for:
- Adding type hints to a Python 2.7 codebase that cannot yet migrate to Python 3.5+
- Enabling static type checkers on legacy Python 3.4 projects
- Documenting function signatures with type annotations in pre-3.5 codebases
- Supporting older Python versions in a package while using type-checking tooling
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type hints and annotations for Python 2.7 and Python 3.4, backporting the standard library typing module to versions before 3.5.
No, unless you are actively maintaining a Python 2.7 or 3.4 codebase. For any modern Python project (3.5+), the stdlib typing module is built-in and superior. This package is a legacy compatibility shim with no releases since 2021-05-01.
Install
typing on PyPI
pip
pip install typinguv
uv add typingpoetry
poetry add typingInstalling typing
Before you install
Low install friction with no runtime dependencies. Maintenance is active, though the package has not released since 2021-05-01. On Python 3.5+, the stdlib typing module takes precedence and this package has no effect.
License in practice
Licensed under PSF (Python Software Foundation License), a permissive license. No licensing restrictions on use or redistribution.
Quickstart
pip install typing
import typing
def greet(name: typing.Text) -> typing.Text:
return 'Hello ' + name
Only works on Python 2.7 and Python 3.4; on Python 3.5+, stdlib typing takes precedence.
Verify before relying
- Whether this package remains necessary given that Python 2.7 and 3.4 are no longer supported
Package facts
| License | PSF (permissive) |
| Python support | capped below the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,931 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,872,624/month — #2,210 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: typing-3.10.0.0-py2-none-any.whl; typing-3.10.0.0-py3-none-any.whl
Keywords: typing, function, annotations, type, hints, hinting, checking, checker, typehints, typehinting, typechecking, backport
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
eval-type-backportEnables newer Python typing syntax (like `X |…
permissive · top 1,000 on PyPI
inspect2Provides the Python 3.6 inspect module API on…
permissive · top 15,000 on PyPI
typing-inspectProvides runtime inspection utilities for…
permissive · top 1,000 on PyPI
importlibProvides importlib.import_module() for Python…
unclear · top 15,000 on PyPI
funcsigsProvides Python function signature…
permissive · top 5,000 on PyPI
stdlib-listProvides lists of Python standard library…
permissive · top 5,000 on PyPI
numpy-typing-compatProvides version-specific type annotations for…
permissive · top 5,000 on PyPI
logutilsProvides additional logging handlers for…
permissive · top 15,000 on PyPI
enum-compatConditionally installs enum34 on Python…
permissive · top 5,000 on PyPI