Проверено на Python3
e = Example(12, 13) serialized = bytes(e) deserialized = Example.from_buffer_copy(serialized)