pip install plyvel
python
import plyvel
db = plyvel.DB('./mydatabase', create_if_missing=True)
db.close()
python
with db.write_batch() as wb:
wb.put(b'key1', b'value1')
wb.put(b'key2', b'value2')
wb.put(b'key3', b'value3')
python
with db.iterator() as it:
for key, value in it:
print(key, value)
python
with db.write_batch() as wb:
wb.delete(b'key1')