typing-inspection provides tools to inspect type annotations at runtime.
typing-inspection
From PyPI:
pip install typing-inspection
The library can be imported from the typing_inspection module.
typing_inspection