Core Utils

This are the Dragon core utils for Python

Classes

class B64

Bases: object

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

decode()
classmethod from_str(serialized_str)
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.

b64decode(the_str)
b64encode(the_bytes)
get_local_kv(key, timeout=None)
get_local_rt_uid()
hash(byte_str: bytes)
host_id()
set_host_id(new_id)
set_local_kv(key, value, timeout=None)
set_procname(name)

Functions

class B64

Bases: object

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

decode()
classmethod from_str(serialized_str)
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.

b64decode(the_str)
b64encode(the_bytes)
get_local_kv(key, timeout=None)
get_local_rt_uid()
hash(byte_str: bytes)
host_id()
set_host_id(new_id)
set_local_kv(key, value, timeout=None)
set_procname(name)

Enums

class B64

Bases: object

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

decode()
classmethod from_str(serialized_str)
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.

b64decode(the_str)
b64encode(the_bytes)
get_local_kv(key, timeout=None)
get_local_rt_uid()
hash(byte_str: bytes)
host_id()
set_host_id(new_id)
set_local_kv(key, value, timeout=None)
set_procname(name)

Exceptions

class B64

Bases: object

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

decode()
classmethod from_str(serialized_str)
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.

b64decode(the_str)
b64encode(the_bytes)
get_local_kv(key, timeout=None)
get_local_rt_uid()
hash(byte_str: bytes)
host_id()
set_host_id(new_id)
set_local_kv(key, value, timeout=None)
set_procname(name)