Skip to main content

Python bindings for RocksDB

Project description

conda-badge

Before first note

The [python-rocksdb](https://github.com/twmht/python-rocksdb) repo has no binary packages. This repo provides binary python wheels statically linked with rocksdb.

Note

The original pyrocksdb (https://pypi.python.org/pypi/pyrocksdb/0.4) has not been updated for long time. I update pyrocksdb to support the latest rocksdb. Please open issues in github if you have any problem.

News (2019/04/18)

Currently I am refactoring the code, and more features like TTL are coming soon. And the installation with cmake will be much more easily.

News (2019/04/19)

I have created a new branch(https://github.com/twmht/python-rocksdb/tree/pybind11) which provides the basic functions (put, get and delete) now. And the installtion is much more easily! you can try it if you encounter any installtion issues in the current version of python-rocksdb.

The branch is under development and will be released to PypI after I migrate most of the existing features.

pyrocksdb

Python bindings for RocksDB. See http://python-rocksdb.readthedocs.io/en/latest/ 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-virtualenv python-dev
$ virtualenv pyrocks_test
$ cd pyrocks_test
$ . bin/active
$ pip install python-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'

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

python_rocksdb_static-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

python_rocksdb_static-0.7.1-cp39-cp39-macosx_10_14_x86_64.whl (3.2 MB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

python_rocksdb_static-0.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

python_rocksdb_static-0.7.1-cp38-cp38-macosx_10_14_x86_64.whl (3.2 MB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

python_rocksdb_static-0.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.6 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

python_rocksdb_static-0.7.1-cp37-cp37m-macosx_10_14_x86_64.whl (3.2 MB view hashes)

Uploaded CPython 3.7m macOS 10.14+ x86-64

python_rocksdb_static-0.7.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.6 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

python_rocksdb_static-0.7.1-cp36-cp36m-macosx_10_14_x86_64.whl (3.2 MB view hashes)

Uploaded CPython 3.6m macOS 10.14+ x86-64

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