import plyveldb = plyvel.DB('./repo', create_if_missing=True)# repo/# |-- 000018.ldb# |-- 000020.ldb# |-- 000021.log# |-- CURRENT# |-- LOCK# |-- LOG# |-- LOG.old# |-- MANIFEST-000019db.put('name', 'n1')db.put('name2', 'n2')cc = db.get('name')print(cc)#db.delete('name2')#cc = db.get('name2')#print(cc)sn = db.snapshot()for i in sn: print(i)for i in db: print(i)db.close()复制代码