--- id: rbloom version: "1.5.4" license: unclear license_treatment: unclear maintenance: aging --- # rbloom — Highly optimized Bloom filter that mimics the Python set API, written in Rust License: unclear · Maintenance: aging · Downloads: 386.1K/mo ## What it is and what it does rBloom is a Bloom filter library written in Rust and exposed to Python, designed to provide fast probabilistic membership testing with a set-like API. It takes two parameters—expected item count and desired false positive rate—and creates a compact bit array that can quickly answer "is this item in the set?" with a tunable error rate. Unlike exact set membership (which requires storing all items), a Bloom filter trades a small, configurable false positive rate for dramatic space savings and speed. The library mimics Python's built-in set type where possible, supporting operations like add, contains, union, intersection, and subset comparisons. It works with any hashable Python object (strings, numbers, tuples, etc.) and includes methods to serialize filters to bytes or disk for persistence. The implementation is compiled against a stable ABI for portability across Python versions, and prebuilt wheels cover most common architectures. Use it for: - Check membership in large datasets (IP blocklists, URL filters, spam detection) where exact storage is impractical - Deduplicate items in streaming data pipelines where occasional false positives are acceptable - Cache negative results: quickly rule out items not in a database before expensive lookups - Combine multiple filters using set operations (union, intersection) to aggregate or refine membership rules - Persist membership state across application restarts by serializing filters to disk or bytes ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements a Bloom filter data structure in Rust with a Python API that mimics the built-in set type, enabling fast probabilistic membership testing for any hashable object. Yes, if you need fast probabilistic membership testing and can tolerate a small, tunable false positive rate. The library is actively maintained, has no dependencies, and offers significantly better performance than pure-Python alternatives. The main caveat is the unclear license—verify it meets your use case before committing to production. Install friction is moderate but manageable for common platforms. ## Install pip install rbloom uv add rbloom poetry add rbloom ## Installing rbloom Before you install: Medium friction due to compiled wheels; prebuilt binaries available for common platforms (x86_64, ARM, PowerPC, s390x on Linux; x86_64 and ARM on macOS; x86 and x64 on Windows), but uncommon platforms require Rust toolchain. No runtime dependencies. Last release 339 days ago; repository active and well-maintained. License in practice: License status is unclear—no SPDX identifier or raw license text provided in package metadata. Before production use, verify the actual license by checking the repository directly. Quickstart: pip install rbloom from rbloom import Bloom bf = Bloom(200, 0.01) # 200 items max, 1% false positive rate bf.add("hello") print("hello" in bf) # True print("world" in bf) # False Requires Python 3.7 or later. On uncommon platforms without prebuilt wheels, installation requires the Rust toolchain. Verify before relying: - Whether the unclear license permits commercial or proprietary use without restriction - Performance characteristics on very large filters (millions of items) in production workloads - Memory overhead compared to pure-Python alternatives or C-based implementations ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 386.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bloom filter python, fast membership testing, probabilistic set operations, rust bloom filter, space-efficient set, false positive rate control, hashable object filtering, data-structures, rust-binding [View on SkillFed](https://skillfed.io/packages/rbloom) · [View on PyPI](https://pypi.org/project/rbloom/)