typingextensions
typing_extensions is an open-source Python library that provides backports and extensions to the typing module. It offers implementations of typing constructs that were introduced in newer Python releases or as provisional features, making them available on older interpreters and enabling experimentation.
Typical features include Literal for exact values, TypedDict for dict-typed records, Protocol for structural subtyping, Final
Usage is straightforward: install via pip install typing_extensions, then import types from typing_extensions, e.g., from typing_extensions
Compatibility: typing_extensions is designed to be source-compatible with the typing module, and its members are often
Relationship: It is separate from the standard typing module but complements it. It is widely used in
Maintenance: The project is community-driven, with releases coordinated with Python's typing evolution. It is hosted on