Fast Python Bloom Filter using Mmap
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Update Docs Apr 27, 2016
src - generated c May 3, 2016
tests
.gitignore - generated c May 3, 2016
.travis.yml Passes the unittests Apr 8, 2016
AUTHORS
CHANGELOG Updated MarkDown, gitignores Apr 8, 2016
LICENSE Replaced djb hash with md5 hash after test shows that djb is not suff… Nov 14, 2011
MANIFEST.in Fixed tests. Jan 5, 2012
Makefile
README.markdown + mem-mapped filters May 3, 2016
setup.py + Add Cython-Not-Found Error May 4, 2016

README.markdown

pybloomfiltermmap3

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

Quickstart

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)
    3
    >>> 'mike' in fruit
    False
    >>> 'apple' in fruit
    True

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.

Docs

Follow the official docs for pybloomfiltermmap. http://axiak.github.io/pybloomfiltermmap/

Install

Please have Cython installed. Please note that this version is specifically meant for Python 3. In case you need Python 2, please see https://github.com/axiak/pybloomfiltermmap.

To install:

    $ pip install cython
    $ pip install pybloomfiltermmap3

and you should be set.

License

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