File: encoding.py

package info (click to toggle)
python-eth-typing 5.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: python: 1,968; makefile: 234
file content (17 lines) | stat: -rw-r--r-- 285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
Types for encoding and decoding data.
"""

from typing import (
    NewType,
    Union,
)

HexStr = NewType("HexStr", str)
"""
A string that represents a hex encoded value.
"""
Primitives = Union[bytes, int, bool]
"""
A type that represents bytes, int or bool primitive types.
"""