def set(key, value): header = {} if isinstance(value, int) or isinstance(value, float): header['type'] = 'NUM' elif isinstance(value, str): header['type'] = "STR" else: header['type'] = "STR" controller.send_request("POST", key, header, str(value))
def delete(key): controller.send_request("DELETE", key)
def decrement(key): header = {'op': 'DECR'} controller.send_request("PUT", key, header)
def get(key): return controller.send_request("GET", key).decode("utf-8")