Metadata-Version: 2.1
Name: rocksdb3
Version: 0.0.2
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Summary: Python bindings for the Rust rocksdb crate
Home-Page: https://github.com/xyb/rocksdb3
Author: Xie Yanbo <xieyanbo@gmail.com>
Author-Email: Xie Yanbo <xieyanbo@gmail.com>
License: Apache-2.0
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# Python bindings for rocksdb

Rocksdb3 is a python bindings for
[rocksdb](https://github.com/facebook/rocksdb) based on rust wrapper
[rust-rocksdb](https://github.com/rust-rocksdb/rust-rocksdb) and
[PyO3](https://github.com/PyO3/pyo3).

This is a very early proof-of-concept version.
Please do not use it in production.

[![Actions Status](https://github.com/xyb/rocksdb3/workflows/tests/badge.svg?branch-master)](https://github.com/xyb/rocksdb3/actions)
[![Latest version](https://img.shields.io/pypi/v/rocksdb3.svg)](https://pypi.org/project/rocksdb3/)
[![Support python versions](https://img.shields.io/pypi/pyversions/rocksdb3.svg)](https://pypi.org/project/rocksdb3/)
[![License](https://img.shields.io/pypi/l/rocksdb3.svg)](https://github.com/xyb/rocksdb3/blob/master/LICENSE)

## Status
  - [x] basic open/put/get/delete/close
  - [ ] iterator
      > depends on pyo3's [non-copy iterator support](https://github.com/PyO3/pyo3/issues/1085)
  - [ ] write batch
  - [ ] destroy/repair

## Install
```
pip install rocksdb3
```

## Examples

```python
import rocksdb3

db = rocksdb3.open_default('db_path')
assert db.get(b'my key') is None
db.put(b'my key', b'my value')
assert db.get(b'my key') == b'my value'
db.delete(b'my key')
assert db.get(b'my key') is None
del db  # auto close db
```

## build

```
pip install maturin
maturin build
```

