bloomfilter-py
Yet another bloomfilter implementation in Python
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-pyuv
uv add bloomfilter-pypoetry
poetry add bloomfilter-pyInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
eth-bloomImplements Ethereum's bloom filter algorithm…
permissive · top 15,000 on PyPI
pybloom-liveImplements Bloom filters—space-efficient…
permissive · top 15,000 on PyPI
rbloomImplements a Bloom filter data structure in…
unclear · top 15,000 on PyPI
bloom-filter2A pure Python implementation of a Bloom…
permissive · top 15,000 on PyPI
phpserializeConverts Python objects to and from PHP…
permissive · top 15,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
PyByteBufferPyByteBuffer provides Java ByteBuffer-style…
copyleft · top 5,000 on PyPI
preshedPreshed provides high-performance Cython hash…
permissive · top 1,000 on PyPI
hickleHickle serializes Python objects to HDF5 files…
unclear · top 15,000 on PyPI