def dumps(obj): """ Serialize an object. Returns: str """ return msgpack.dumps(obj, use_bin_type=True)