bloomfilter3
Python bloom-filter library with a focus on ease of use and high performance.
Motivation
This library was heavily inspired from the excellent bloom-filter2 library, however I decided to make some changes that enhanced functionality and ease of use.
Unfortunatly these changes makes the library non-backwards compatible, hence bloomfilter3 was born.
Credits and links can be found in AUTHORS.md.
Changes from bloom-filter2:
- mmap only and by default
- bloom filter parameters are stored WITH the bloom filter itself on disk, no need to keep track of parameters (max_elements, error_rate) seperatly
- Simpler persistence
Using
from bloom_filter3 import BloomFilter
# instantiate BloomFilter with custom settings,
# max_elements is how many elements you expect the filter to hold.
# error_rate defines accuracy; You can use defaults with
# `BloomFilter()` without any arguments. Following example
# is same as defaults:
bloom = BloomFilter(
max_elements=10_000,
error_rate=0.1
)
# Test whether the bloom-filter has seen a key:
assert "test-key" not in bloom
# Mark the key as seen
bloom.add("test-key")
# Now check again
assert "test-key" in bloom
Contributing
- Please review CODE_OF_CONDUCT.md
- Please make sure you do
make testsandmake lintbefore submitting a PR - Please make sure you add tests for any new functionality
Metadata
Release files for bloomfilter3 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bloomfilter3-1.0.2.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bloomfilter3-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / bloomfilter3-1.0.2.tar.gz
| Download URL | bloomfilter3-1.0.2.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a274c191fe350fe9b45ba4cc622b1a7449a8f1585a408659e6eddcb370f9e88
|
|
BLAKE2b-256 checksum How to use checksums |
c61edb03d5a67df3e121a7b1e206d3def5af3541c6149fd3783f16d50c8a98da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / bloomfilter3-1.0.2-py3-none-any.whl
| Download URL | bloomfilter3-1.0.2-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5085efedb824323a152ddcd73d50204463b183ca3cb30b1eca373f7fb3db1fe2
|
|
BLAKE2b-256 checksum How to use checksums |
5107dde128df8041ea1b15619b4cb814226d3e9b139243a69b1247d8ad1171ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for bloomfilter3 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.