Skip to main content

A Bloom filter (bloomfilter) for Python 3 built on mmap

Project description


pybloomfiltermmap3 is a Python 3 compatible fork of pybloomfiltermmap by @axiak.

The goal of pybloomfiltermmap3 is simple: to provide a fast, simple, scalable, correct library for Bloom Filters in Python.

Build Status PyPI PyPI PyPI


After you install, the interface to use is a cross between a file interface and a ste interface. As an example:

    >>> import pybloomfilter
    >>> fruit = pybloomfilter.BloomFilter(100000, 0.1, '/tmp/words.bloom')
    >>> fruit.update(('apple', 'pear', 'orange', 'apple'))
    >>> len(fruit)
    >>> 'mike' in fruit
    >>> 'apple' in fruit

To create an in-memory filter, ditch the file location.

    >>> cakes = pybloomfilter.BloomFilter(10000, 0.1)

Caveates: It is currently not possible to persist this filter later.


Follow the official docs for pybloomfiltermmap.


Please have Cython installed. Please note that this version is specifically meant for Python 3. In case you need Python 2, please see

To install:

    $ pip install cython
    $ pip install pybloomfiltermmap3

and you should be set.


See the LICENSE file. It's under the MIT License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybloomfiltermmap3-0.4.19.tar.gz (472.7 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page