skillfed

typing

Type Hints for Python

typing v3.10.0.0 4.9M downloads/30d#2,210 on PyPI1,774
Permissive license PSF Active released

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 typing

uv

uv add typing

poetry

poetry add typing

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Python Software Foundation LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Topic :: Software Development

Tags

type hints backporttyping module python 2.7function annotationstype checking supportpython 3.4 typingstatic type hintslegacy python typing
backportlegacy-python

More Software Development packages