skillfed

rbloom

Highly optimized Bloom filter that mimics the Python set API, written in Rust

rbloom v1.5.4 386.1K downloads/30d#7,053 on PyPI318
License unclear AGING released

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 on this page — 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

rbloom on PyPI

pip

pip install rbloom

uv

uv add rbloom

poetry

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 the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance aging — 339 days since the last release
Last repo commit
First released
Downloads 386,080/month — #7,053 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: rbloom-1.5.4-cp37-abi3-macosx_10_12_x86_64.whl; rbloom-1.5.4-cp37-abi3-macosx_11_0_arm64.whl; rbloom-1.5.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; rbloom-1.5.4-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; rbloom-1.5.4-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; rbloom-1.5.4-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl; rbloom-1.5.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; rbloom-1.5.4-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl; rbloom-1.5.4-cp37-abi3-win32.whl; rbloom-1.5.4-cp37-abi3-win_amd64.whl

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Tags

bloom filter pythonfast membership testingprobabilistic set operationsrust bloom filterspace-efficient setfalse positive rate controlhashable object filtering
data-structuresrust-binding

More Software Development packages