def load(self, key): req_msg = ps_types.StoreRequest( requestType=ps_types.StoreRequestType.LOAD, key=key, data="") resp = self._send_req(req_msg) if resp.success: return resp.data raise KeyError("Key cannot be loaded")
def store(self, key, data): req_msg = ps_types.StoreRequest( requestType=ps_types.StoreRequestType.STORE, key=key, data=data) return self._send_req(req_msg).success
def erase(self, key): req_msg = ps_types.StoreRequest( requestType=ps_types.StoreRequestType.ERASE, key=key, data="") return self._send_req(req_msg).success