encoding.py 285 B

1234567891011121314151617
  1. """
  2. Types for encoding and decoding data.
  3. """
  4. from typing import (
  5. NewType,
  6. Union,
  7. )
  8. HexStr = NewType("HexStr", str)
  9. """
  10. A string that represents a hex encoded value.
  11. """
  12. Primitives = Union[bytes, int, bool]
  13. """
  14. A type that represents bytes, int or bool primitive types.
  15. """