def to_base64(self):
    ' Hex representation of the serialized byte stream.\n\n        Returns:\n            str: A Base64-encoded string.\n        '
    return base64.b64encode(bytes(self))
Hex representation of the serialized byte stream.

Returns:
    str: A Base64-encoded string.
def to_base64(self):
    ' Hex representation of the serialized byte stream.\n\n        Returns:\n            str: A Base64-encoded string.\n        '
    return base64.b64encode(bytes(self))