runtime_typing

runtime_typing is a python module for runtime validating function arguments and return values against constraints defined by type annotation using python’s typing module.

The project is on GitHub <https://github.com/jonathan-scholbach/runtime_typing>_

The following types and typing-constructs are covered:

  • primitives (python builtin-types, custom classes)

  • typing.Any

  • typing.AnyStr

  • typing.Callable

  • typing.Dict

  • typing.Iterable

  • typing.Literal

  • typing.Optional

  • typing.Tuple

  • typing.Type

  • typing.TypeVar

  • typing.Union