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