skillfed

bloomfilter-py

Yet another bloomfilter implementation in Python

bloomfilter-py v1.1.0 249.8K downloads/30d#8,646 on PyPI12
Permissive license MIT License Copyright (c) 2020 OldPanda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) DORMANT released

What it is and what it does

bloomfilter-py is a Bloom filter library designed to bridge Python and Java ecosystems. It implements the probabilistic data structure for fast membership testing (answering 'is X in this set?' with no false negatives but possible false positives) and focuses specifically on serializing and deserializing Bloom filters in a format compatible with Java's Guava library. This solves the problem of exchanging Bloom filter state between Python and Java applications without reimplementing the entire structure.

The package provides multiple serialization formats—raw bytes, hex strings, and base64-encoded data—making it flexible for storage and transmission. You create a filter by specifying expected insertions and error rate, add items with `put()`, test membership with the `in` operator, and serialize/deserialize using `dumps()`, `loads()`, and their format-specific variants. It depends on bitarray for efficient bit manipulation and mmh3 for hashing.

Use it for:

  • Exchanging Bloom filter state between Python microservices and Java backend systems without data loss or format conversion.
  • Caching membership tests in distributed systems where false positives are acceptable but false negatives are not.
  • Deduplication pipelines that need to share filter snapshots across language boundaries for consistency.
  • Testing Java Guava Bloom filter implementations by round-tripping serialized data through Python.
  • Building probabilistic data structures for URL or item deduplication in web crawlers or ETL pipelines.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements Bloom filters in Python with serialization/deserialization compatible with Java's Guava library, enabling cross-language Bloom filter interchange.

Yes, if you need Bloom filter functionality with Java Guava compatibility. The low install friction, permissive MIT license, and stable API make it straightforward to adopt. However, dormant maintenance (last activity 2024-08-10, no recent commits) means you should verify compatibility with your target Python version and be prepared to fork or switch if future dependency updates break compatibility. No known vulnerabilities.

Install

bloomfilter-py on PyPI

pip

pip install bloomfilter-py

uv

uv add bloomfilter-py

poetry

poetry add bloomfilter-py

Installing bloomfilter-py

Before you install

Low install friction with only two runtime dependencies (bitarray and mmh3). Maintenance is dormant—last commit was 2024-08-10 but no activity since, and the repository has only 12 stars. The package is marked Production/Stable and supports Python 3.8 through 3.12, but future updates are uncertain.

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal restrictions. You may use this in commercial or proprietary projects provided you include the license notice.

Quickstart

pip install bloomfilter-py

from bloomfilter import BloomFilter
bloom_filter = BloomFilter(expected_insertions=500, err_rate=0.01)
bloom_filter.put(1)
print(1 in bloom_filter)  # True
dumps = bloom_filter.dumps()
bf = BloomFilter.loads(dumps)

Requires Python 3.8 or later. Runtime dependencies bitarray and mmh3 must be installed (handled automatically by pip).

Verify before relying

  • Whether the Guava compatibility extends to all serialization formats or only specific versions of Guava.
  • Performance characteristics (memory footprint, insertion/lookup speed) compared to other Bloom filter implementations.
  • Whether dormant maintenance status will affect compatibility with future Python or dependency updates.

Package facts

License MIT License Copyright (c) 2020 OldPanda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — bitarray, mmh3
Maintenance dormant — 734 days since the last release
Last repo commit
First released
Downloads 249,786/month — #8,646 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: bloomfilter_py-1.1.0-py3-none-any.whl

Keywords: bloomfilter

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

bloom filter pythonguava bloom filter compatiblebloom filter serializationprobabilistic set membershipbloom filter java interopbloom filter implementationcross-language bloom filter
bloom-filterjava-interopprobabilistic-data-structure

More Python Modules packages