Registry / ai-ml / rensa
library0.4.0pypypi✓ verified 83d ago

rensa is a high-performance MinHash implementation written in Rust with Python bindings, currently at version 0.4.0. It provides MinHash signatures and Jaccard similarity computation, claiming up to 40x speed improvement over datasketch. It requires Python >=3.8 and is released on PyPI.

pip install rensa
INSTALL
IMPORT
SIG · RENSA
R
rensa
ai-mlpythonv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

CMinHash
✓ from rensa import CMinHash
✗ from rensa import MinHash
RMinHash
✓ from rensa import RMinHash
✗ from rensa import MinHash
RMinHashLSH
✓ from rensa import RMinHashLSH
✗ from rensa import MinHash

Basic usage of MinHash: create two MinHash instances, update with byte strings, and compute Jaccard similarity.

from rensa import MinHash m1 = MinHash() m2 = MinHash() for d in ["hello", "world"]: m1.update(d.encode('utf-8')) for d in ["hello", "rust"]: m2.update(d.encode('utf-8')) print("Jaccard similarity:", m1.jaccard(m2))
Debug
Known issues
gotchaInput to update() must be bytes, not strings. Forgetting to encode strings leads to TypeError.
fix
Use .encode('utf-8') or pass bytes directly.
affects: all
gotchaMinHash signatures are not serializable directly. The library does not provide a built-in serialization method as of 0.4.0.
fix
Manually extract signature via m.signature (a list) and serialize with e.g. pickle or JSON (but note performance).
affects: 0.4.0
deprecatedIf you previously used rensa from a different source (e.g., a fork), note that the API is minimal and may change in future versions.
fix
Check the latest documentation on GitHub for any API changes.
affects: <0.4.0
Upgrade
Version history
0.4.0latest on PyPI · released Feb 26, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
45 hits · last 30 days
node
40
Resources
rensa — pip install rensa · libregistry