https://github.com/sysatom/python-bloom-filter
A Simple Bloom Filter for Python
https://github.com/sysatom/python-bloom-filter
bloom-filter pip python
Last synced: 11 months ago
JSON representation
A Simple Bloom Filter for Python
- Host: GitHub
- URL: https://github.com/sysatom/python-bloom-filter
- Owner: sysatom
- License: mit
- Created: 2019-03-22T05:12:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-22T06:08:15.000Z (over 7 years ago)
- Last Synced: 2025-06-20T18:47:28.168Z (about 1 year ago)
- Topics: bloom-filter, pip, python
- Language: Python
- Homepage: https://pypi.org/project/bfilter/
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Simple Bloom Filter for Python
[](https://travis-ci.org/sysatom/python-bloom-filter)
### Install
```bash
pip install bfilter
```
### Usage
```python
from bfilter.bloomfilter import BloomFilter
bf = BloomFilter(100000, 7)
for i in range(5000):
bf.add('%s' % i)
print(bf.lookup('333'))
print(bf.lookup('100000'))
print(bf.lookup('500001'))
print(bf.lookup('510001'))
```
### Requirements
This project requires Python 3.6 or newer.
### License
You can find the license for this code in [the LICENSE file](LICENSE).