Registry / database / aimrocks

aimrocks

JSON →
library0.5.2pypypi✓ verified 83d ago

High-performance Python RocksDB wrapper implemented in Cython, based on facebook/rocksdb. Version 0.5.2 is the latest release, with sporadic updates. Aimed at users needing key-value storage with RocksDB's LSM-tree engine.

pip install aimrocks
INSTALL
IMPORT
SIG · AIMROCKS
A
aimrocks
databasepythonv0.5.2
Install
1.8s avg
Import
Disk
40MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 1.8s
py 3.11
✕ build_error
✓ 1.8s
py 3.12
✕ build_error
✓ 1.7s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 2s
40MB installed
● package 40MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DB
from aimrocks import DB
import rocksdb
Options
from aimrocks import Options
rocksdb.Options
Iterator
from aimrocks import Iterator
rocksdb.Iterator

Open (or create) a RocksDB database, write and read a key-value pair.

import rocksdb opts = rocksdb.Options() opts.create_if_missing = True db = rocksdb.DB('/tmp/test.db', opts) db.put(b'key', b'value') print(db.get(b'key')) db.close()
Debug
Known issues
gotchaRocksDB must be installed on the system (librocksdb-dev) before pip installing aimrocks. Missing system rocksdb will cause compilation failures.
fix
Install RocksDB library: e.g., `apt-get install librocksdb-dev` (Debian/Ubuntu) or `brew install rocksdb` (macOS).
affects: all
breakingaimrocks 0.5.x changed the namespace from `aimrocks` to `rocksdb`. Older code importing `aimrocks` directly will break.
fix
Use `import rocksdb` instead of `import aimrocks`.
affects: >=0.5.0
gotchaKeys and values must be bytes objects. Passing strings will raise TypeError or silently fail.
fix
Always encode strings to bytes: `db.put(b'key', b'value')` or `db.put('key'.encode(), 'value'.encode())`.
affects: all
Upgrade
Version history
0.5.2latest on PyPI · released Apr 24, 2024
Audit
Dependencies
rocksdboptionalC library required; system-level installation of RocksDB may be needed (e.g., apt install librocksdb-dev).
Agent activity
51 hits · last 30 days
node
40
OpenAI (training)
2
Resources
aimrocks — pip install aimrocks · libregistry