Skip to main content

Python bindings for RocksDB

Project description

Python bindings for RocksDB. See http://rocksdb.readthedocs.io for a more comprehensive install and usage description.

Quick install

Quick install for debian/ubuntu like linux distributions.

$ apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev
$ git clone https://github.com/facebook/rocksdb.git
$ cd rocksdb
$ mkdir build && cd build
$ cmake ..
$ make
$ cd ..
$ export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+:}`pwd`/include/
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}`pwd`/build/
$ export LIBRARY_PATH=${LIBRARY_PATH}${LIBRARY_PATH:+:}`pwd`/build/

$ apt-get install python-dev
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install rocksdb

Quick usage guide

>>> import rocksdb
>>> db = rocksdb.DB("test.db", rocksdb.Options(create_if_missing=True))
>>> db.put(b'a', b'data')
>>> print db.get(b'a')
b'data'

Acknowledgements

This project is a fork of python-rocksdb maintained by twmht, which itself is a fork of pyrocksdb, that was originally written by stephan-hof.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rocksdb-0.8.0rc1.tar.gz (29.8 kB view hashes)

Uploaded Source

Built Distributions

rocksdb-0.8.0rc1-cp39-cp39-manylinux2014_x86_64.whl (51.4 MB view hashes)

Uploaded CPython 3.9

rocksdb-0.8.0rc1-cp38-cp38-manylinux2014_x86_64.whl (51.4 MB view hashes)

Uploaded CPython 3.8

rocksdb-0.8.0rc1-cp37-cp37m-manylinux2014_x86_64.whl (51.3 MB view hashes)

Uploaded CPython 3.7m

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page