Core Utils
This are the Dragon core utils for Python
Classes
- class B64
Cython wrapper for Dragon’s byte <> string conversion routines.
- __init__()
Convert a bytes array into a base64 encoded string. :param data: The list of bytes to convert. :return: A new B64String object containing the base64 encoded string.
- classmethod bytes_to_str(the_bytes)
Converts bytes into a string by base64 encoding it. Convenience function to convert bytes objects to base64 encoded strings. :param the_bytes: bytes to get encoded :return: string
- classmethod str_to_bytes(the_str)
Converts a base64 encoded string to a bytes object. Convenience function to unpack strings. :param the_str: base64 encoded string. :return: original bytes representation.
Functions
- class B64
Cython wrapper for Dragon’s byte <> string conversion routines.
- __init__()
Convert a bytes array into a base64 encoded string. :param data: The list of bytes to convert. :return: A new B64String object containing the base64 encoded string.
- classmethod bytes_to_str(the_bytes)
Converts bytes into a string by base64 encoding it. Convenience function to convert bytes objects to base64 encoded strings. :param the_bytes: bytes to get encoded :return: string
- classmethod str_to_bytes(the_str)
Converts a base64 encoded string to a bytes object. Convenience function to unpack strings. :param the_str: base64 encoded string. :return: original bytes representation.
Enums
- class B64
Cython wrapper for Dragon’s byte <> string conversion routines.
- __init__()
Convert a bytes array into a base64 encoded string. :param data: The list of bytes to convert. :return: A new B64String object containing the base64 encoded string.
- classmethod bytes_to_str(the_bytes)
Converts bytes into a string by base64 encoding it. Convenience function to convert bytes objects to base64 encoded strings. :param the_bytes: bytes to get encoded :return: string
- classmethod str_to_bytes(the_str)
Converts a base64 encoded string to a bytes object. Convenience function to unpack strings. :param the_str: base64 encoded string. :return: original bytes representation.
Exceptions
- class B64
Cython wrapper for Dragon’s byte <> string conversion routines.
- __init__()
Convert a bytes array into a base64 encoded string. :param data: The list of bytes to convert. :return: A new B64String object containing the base64 encoded string.
- classmethod bytes_to_str(the_bytes)
Converts bytes into a string by base64 encoding it. Convenience function to convert bytes objects to base64 encoded strings. :param the_bytes: bytes to get encoded :return: string
- classmethod str_to_bytes(the_str)
Converts a base64 encoded string to a bytes object. Convenience function to unpack strings. :param the_str: base64 encoded string. :return: original bytes representation.