You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frompykvdbimportKVDBimportos# set db file path, default is './pykvdb'dbpath=os.path.join(os.path.split(os.path.realpath(__file__))[0], 'kvdb')
# set db file maxsize, default is 10Mdbsize=10*1024*1024withKVDB(path=kvpath, size=dbsize) askv:
kv.set('a', 'test')
# get valuewithKVDB(path=kvpath, size=dbsize) askv:
print(kv.get('a'))
# scan all key-valuewithKVDB(path=kvpath, size=dbsize) askv:
cur=kv.cursor()
fork, vincur:
print(k.decode(), v.decode())