PEP 827 type manipulation library for Python 3.14+
pip install typemapThis repository contains the typemap package, which provides utilities for working with PEP 827 type manipulation operators.
eval_typing- Evaluate type expressions at runtime- Type operators via
typemap_extensions:Member- Access type members by nameAttrs- Get class attributesIter- Iterate over type contentsParam- Define callable parametersUpdateClass- Generate class modificationsNewProtocol- Create protocols dynamicallyIsAssignable- Check type assignabilityKeyOf- Get all member names as tuple of LiteralsTemplate- Build template literal stringsDeepPartial- Make all fields recursively optionalPartial- Make all fields optional (non-recursive)Required- Remove Optional from all fieldsPick- Pick specific fields from a typeOmit- Omit specific fields from a type
See packages/typemap/README.md for detailed usage.
- Python 3.14+
- typing_extensions >= 4.0