Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
faust-streamingPublic archive

About

Python bindings for RocksDB used by faust-streaming

Topics

Resources

Stars

25 stars

Watchers

4 watching

Forks

 
 

Latest commit

 

History

45 Commits

Folders and files

Repository files navigation

pyrocksdb

Python bindings for RocksDB.

This project is under development, and more features are coming soon.

For any other usage, please follow https://twmht.github.io/python-rocksdb/index.html

Quick Install

Quick install for debian/ubuntu like linux distributions.

git clone https://github.com/twmht/python-rocksdb.git --recursive -b pybind11
cd python-rocksdb
python setup.py install

Quick Usage Guide

import pyrocksdb
db = pyrocksdb.DB()
opts = pyrocksdb.Options()
# for multi-thread
opts.IncreaseParallelism()
opts.OptimizeLevelStyleCompaction()
opts.create_if_missing = True
s = db.open(opts, '/path/to/db')
assert(s.ok())
# put
opts = pyrocksdb.WriteOptions()
s = db.put(opts, b"key1", b"value1")
assert (s.ok())
# get
opts = pyrocksdb.ReadOptions()
blob = db.get(opts, b"key1")
print (blob.data) # b"value1"
print (blob.status.ok()) # true
#delete
opts = pyrocksdb.WriteOptions()
s = db.delete(opts, b"key1")
assert(s.ok())
db.close()

About

Python bindings for RocksDB used by faust-streaming

Topics

Resources

Stars

25 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages