A bytes object can be converted to an integer value easily using Python. You can use from_bytes() method to do that.
Syntax
int.from_bytes(bytes, byteorder, *, signed=False) ...