Skip to main content
Help us improve Python packaging – donate today!

Portable, cross language Bloom Fitler implementation, with compatible libraries in Java and Go

Project Description

Package inbloom implements a portable bloom filter that can export and import data to and from implementations of the same library in different languages.

This implementation is a C extension which wraps libbloom (https://github.com/jvirkki/libbloom)

Installation

pip install inbloom

Usage

import inbloom

bf = inbloom.Filter(entries=100, error=0.01)
bf.add("abc")
bf.add("def")

assert bf.contains("abc")
assert bf.contains("def")
assert not bf.contains("ghi")

bf2 = inbloom.Filter(entries=100, error=0.01, data=bf.buffer())
assert bf2.contains("abc")
assert bf2.contains("def")
assert not bf2.contains("ghi")

Serialization

import inbloom
import binascii

payload = '620d006400000014000000000020001000080000000000002000100008000400'
assert binascii.hexlify(inbloom.dump(inbloom.load(binascii.unhexlify(payload)))) == payload

Release history Release notifications

This version
History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
inbloom-0.2.2.tar.gz (11.8 kB) Copy SHA256 hash SHA256 Source None Aug 3, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page