@@ -0,0 +1,839 @@
+# -*- coding: utf-8 -*-%0A%0Afrom . import SessionStorage%0A%0Aimport sae.kvdb%0A%0A%0Aclass SaeKVDBStorage(SessionStorage):%0A    %22%22%22%0A    SaeKVDBStorage %E4%BD%BF%E7%94%A8SAE %E7%9A%84 KVDB %E6%9D%A5%E4%BF%9D%E5%AD%98%E4%BD%A0%E7%9A%84session%0A    %0A    %E9%9C%80%E8%A6%81%E5%85%88%E5%9C%A8%E5%90%8E%E5%8F%B0%E5%BC%80%E5%90%AF KVDB %E6%94%AF%E6%8C%81%0A%0A    from werobot.session.saekvstorage import SaeKVDBStorage%0A%0A    session_storage = SaeKVDBStorage()%0A    robot = werobot.WeRoBot(token=%22token%22, enable_session=True,%0A                            session_storage=session_storage)%0A%0A    %22%22%22%0A    def __init__(self, prefix='WESESSION'):%0A        self.kv = sae.kvdb.KVClient()%0A        self.prefix = prefix%0A%0A    def prefixid(self, id):%0A        return self.prefix + str(id)%0A%0A    def get(self, id):%0A        return self.kv.get(self.prefixid(id)) or %7B%7D%0A%0A    def set(self, id, value):%0A        return self.kv.set(self.prefixid(id), value)%0A%0A    def delete(self, id):%0A        return self.kv.delete(self.prefixid(id))%0A%0A

add SAE kv storage for session