diff --git a/comrad/backend/crypt.py b/comrad/backend/crypt.py index de076ae..27a8fb8 100644 --- a/comrad/backend/crypt.py +++ b/comrad/backend/crypt.py @@ -61,8 +61,10 @@ class Crypt(Logger): # self.store = RedisStore(redis.StrictRedis()) # self.db = Vedis(self.fn) # self.db = WalrusLite(self.fn) - import hirlite - self.db = hirlite.Rlite(path=self.fn) + # import hirlite + # self.db = hirlite.Rlite(path=self.fn) + from pupdb.core import PupDB + self.db = PupDB(self.fn) def log(self,*x,**y): @@ -125,7 +127,8 @@ class Crypt(Logger): #self.store.put(k_b_hash,v_b) #with self.db.transaction(): # self.db[k_b_hash]=v_b - return self.db.command('set',k_b_hash,v_b) + # return self.db.command('set',k_b_hash,v_b) + return self.db.set(k_b_hash,v_b) # return True def exists(self,k,prefix=''): @@ -142,7 +145,8 @@ class Crypt(Logger): k_b=self.package_key(k,prefix=prefix) k_b_hash = self.hash(k_b) - v = self.db.command('del',k_b_hash) + # v = self.db.command('del',k_b_hash) + v = self.db.remove(k_b_hash) self.log('<--',v) return v @@ -156,7 +160,8 @@ class Crypt(Logger): self.log('getting k_b',k_b) self.log('getting k_b_hash',k_b_hash) - v = self.db.command('get',k_b_hash) + # v = self.db.command('get',k_b_hash) + v = self.db.get(k_b_hash) self.log('<--',v) v_b=self.unpackage_val(v) @@ -203,7 +208,8 @@ class CryptList(Crypt): # like inbox val_x = self.package_val(val) # with self.db.transaction(): # res = self.db.lpush(self.keyname,val_x) - res = self.db.command('rpush',self.keyname,val_x) + # res = self.db.command('rpush',self.keyname,val_x) + oldval = self.db.get(self.keyname) self.log('-->',res) return res diff --git a/requirements.txt b/requirements.txt index 61c6f13..da1aae4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,7 +32,7 @@ mccabe==0.6.1 numpy pandas pathtools==0.1.2 -Pillow==7.2.0 +Pillow plyer==1.4.3 pycparser==2.20 pyfiglet==0.8.post1 @@ -58,9 +58,9 @@ termcolor==1.1.0 text2art==0.2.0 toml==0.10.1 torpy==1.1.3 -typed-ast==1.4.1 +typed-ast u-msgpack-python==2.7.0 -ujson==3.1.0 +ujson urllib3==1.25.10 utm==0.6.0 watchdog==0.10.3