lsm-db-extras 0.5.0

Creator: bigcodingguy24

Last updated:

Add to Cart

Description:

lsmdbextras 0.5.0

Thread/Process safe shelves and other lam-db helpers

Installation
pip install lsm-db-extras


Usage example
from lsm_extras import Shelf, LSMDict, LSMTree

with Shelf("/tmp/test.ldb") as shelf:
shelf["foo"] = True


with Shelf("/tmp/test.ldb") as shelf:
print(shelf["foo"])


with LSMDict("/tmp/test-dict.ldb") as storage:
storage[1] = True


with LSMDict("/tmp/test-dict.ldb") as storage:
print(storage[1])


with LSMTree("/tmp/test-tree.ldb") as storage:
with tree.transaction():
for i in range(10):
tree['numbers', i] = i * 2
tree['strings', i] = str(i)

print(list(tree.find('strings')))

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.