HexBytes
HexBytes is a very thin wrapper around the python built-in bytes class.
It adds these features:
Accepts more types for initializing values:
boolbytearraybytesint(non-negative)strmemoryview
The representation at console (
__repr__) is 0x-prefixedto_0x_hexreturns a 0x-prefixed hex string
Installation
python -m pip install hexbytes
General
Community