def save(self): if not self.__key: return self.parent.save() self.__timestamp = time() kv.set(self.__key, {"timestamp": self.__timestamp, "locked": self.__locked}, self._to_python()) kv.__state = self.SAVED return True
def set(self, key, value, timeout = DEFAULT_TIMEOUT, version = None): key = self.make_key(key, version = version) kv.set(key, self.get_backend_timeout(timeout), value)