Extras¶
- simple_rpc.extras.dict_to_object(d)¶
Convert a dictionary using UTF-8 to an object using binary strings.
- Parameters
d (
dict
) – Dictionary with UTF-8 encoded strings.- Return type
object
- Returns
Object with binary encoded strings.
- simple_rpc.extras.json_utf8_decode(obj)¶
Decode all strings in an object to UTF-8.
- Parameters
obj (
object
) – Object.- Return type
object
- Returns
Object with UTF-8 encoded strings.
- simple_rpc.extras.json_utf8_encode(obj)¶
Binary encode all strings in an object.
- Parameters
obj (
object
) – Object.- Return type
object
- Returns
Object with binary encoded strings.
- simple_rpc.extras.make_function(method)¶
Make a member function for a method.
- Parameters
method (
dict
) – Method object.- Return type
callable
- Returns
New member function.
- simple_rpc.extras.object_to_dict(obj)¶
Convert an object using binary strings to a dictionary using UTF-8.
- Parameters
obj (
object
) – Object with binary encoded strings.- Return type
dict
- Returns
Dictionary with UTF-8 encoded strings.