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