Skip to main content

Note: This project has gone unmaintained for a while, please use the more up-to-date project at: - https://github.com/remram44/python-bloom-filter - https://pypi.org/project/bloom-filter2/

A pure python bloom filter (low storage requirement, probabilistic set datastructure) is provided. It is known to work on CPython 2.x, CPython 3.x, Pypy and Jython.

Includes mmap, in-memory and disk-seek backends.

The user specifies the desired maximum number of elements and the desired maximum false positive probability, and the module calculates the rest.

Usage:

from bloom_filter import BloomFilter

# instantiate BloomFilter with custom settings,
# max_elements is how many elements you expect the filter to hold.
# error_rate defines accuracy; You can use defaults with
# `BloomFilter()` without any arguments. Following example
# is same as defaults:
bloom = BloomFilter(max_elements=10000, error_rate=0.1)

# Test whether the bloom-filter has seen a key:
assert "test-key" in bloom is False

# Mark the key as seen
bloom.add("test-key")

# Now check again
assert "test-key" in bloom is True

Metadata

Release files for bloom-filter 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bloom-filter 1.3.3
File Size Uploaded Provenance Actions
bloom_filter-1.3.3.tar.gz 7.2 kB Without provenance Details for bloom_filter-1.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bloom-filter 1.3.3
File Interpreter ABI Platform Actions
bloom_filter-1.3.3-py3-none-any.whl Python 3 none any Details for bloom_filter-1.3.3-py3-none-any.whl

Total release size: 15.3 kB

Release files / bloom_filter-1.3.3.tar.gz

Download URL bloom_filter-1.3.3.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8c230b748565c0b7493923542be9658d9a247d3205352d4f65d428a4bf462ec8
BLAKE2b-256 checksum
How to use checksums
b24243d11c75b769cb4e7ca1fd756c4ac98db5144ce2e00711a25dcbe1412648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.10

Release files / bloom_filter-1.3.3-py3-none-any.whl

Download URL bloom_filter-1.3.3-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
937f3e6843fd137aa8a7723c556b970e9bc8a55e2100d86d46262469ae128dd1
BLAKE2b-256 checksum
How to use checksums
b3bf6f08439d017abdbf1594f5acfdf39d0c0f2d9a16eefdb69f334a5d5e7e3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.10

Security for bloom-filter 1.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page