-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python bindings #30
Comments
The rocksdb C++ api is far more richer than the leveldb api. But we have (sadly) failed to enhance the C api in the same way. If you would like to bring the C api in par with C++ api, that will be a great contribution to the rocksdb github repo. |
Great then, I am on it :) |
@sepeth Feel free to change leveldb_* in |
👍 @sepeth if you want to some hands for your contributions, I could be with you. :) |
@igorcanadi I sent it :) @junyoungKim Great :) I started with renames, and I will keep c-api branch updated in my fork as I progress. We can continue from there, I think. |
@sepeth ok, I've checked your branch for the jobs. Lets think about how we can implement it in a best way. |
I find that rocksdb's C API is much the same with leveldb's C API, I have written a python leveldb binding based on its C API before(https://github.com/forhappy/cpy-leveldb), so I can make it for rocksdb much easier, I'm on it too ;-). |
Hi @sepeth have you considered other methods for wrapping ? For example Cython has great capabilities to wrap c++ code and the generated code works under python2 and python3 Only drawback, it generates code for cPython only. For a more 'interpreter-independent' way you should also check out CFFI. The 'wrap-performance' on pypy is outstanding (because the JIT knows of the C-functions and types and calls them directly) and on cPython comparable to ctypes. However I don't know the status of CFFI for Jython/IronPython, but if you really target this two interpreters you should also check if they support ctypes properly. |
Hello @sepeth , Any idea on when the python bindings for RocksDB will be available? |
@ramanala hello, hardest part of it is to complete C api, I believe. I've been doing somethings on that part (but some other things in my life kept me away from doing it), and still stuck with merge operator. In the mean time, I am playing with rocksdb from python. It seems easy to do with ctypes. @stephan-hof Thank you. I am also considering CFFI, beside ctypes. and also pypy seems to suggest CFFI too. |
Hi guys, I also started python bindings for rocksdb. I'm using cython to wrap the C++ bindings directly.
The driver is still not complete yet, for example a python prefix_extractor is not possible, but the basic operations are already possible. Everything mentioned in the docs (like merge operator) should work. Give it a try, I would be happy for everybody who would like to join the development. |
Closing the issue since it's stale. Thank you everybody for contributing to python bindings! |
Added Applatix build link.
iterator: Start on correct value when reverse=true
I am planning to code rocksdb bindings for python. So far, I am able to use basic rocksdb functionality in python :)
I think, I will use python ctypes and rocksdb C API. ATM, rocksdb/include/c.h is almost the same with leveldb counterpart (eg. all function names and structs starts with leveldb). Will you keep it that way, or do you plan to change it? or I can maintain and take care of that part happily :)
As a second option, I can directly use rocksdb C++ API, by writing CPython extension. But the outcome won't be portable between different python implementations and will only work with CPython.
What do you think about that?
The text was updated successfully, but these errors were encountered: