Bloom filter based on redis
Project description
pyredisbloomfilter
python bloom filter based on redis
python version
python2.7.x and python 3.5+ is supported
redis client requirements
basic dependency redis-py
if your redis is in cluster mode, you must import rediscluter from package redis-py-cluster by yourself
note: redis-py-cluster does not support pipeline with transaction
how to use
import redis
import redisbloomfilter
name = "bloomfilter"
number_of_insertion=10000000
error_rate = 0.00001
redis_client = redis.StrictRedis()
bloom_filter = redisbloomfilter.RedisBloomFilter(name, number_of_insertion, error_rate, redis_client)
try:
bloom_filter.initialize()
except redis.RedisError:
print('occurs redis error')
raise
except redisbloomfilter.BloomFilterException:
print('bloom filter exception')
raise
bloom_filter.put("abc")
bloom_filter.contains("abc")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file redis-bloom-filter-1.0.1.tar.gz
.
File metadata
- Download URL: redis-bloom-filter-1.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502d1b86d9c8a463fc94aeb43dbe3e3878396fa7610bed631e2bc558830d7d64 |
|
MD5 | 29897c076937465ad9986ab44a7ed6cb |
|
BLAKE2b-256 | c41911c3713d3771785972104cd44a5ed517d566bb3ca8cc29256452158d242f |
File details
Details for the file redis_bloom_filter-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: redis_bloom_filter-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee4e0996c090806ee457b3a5a7e3d32d4ae2c98221f59d2f461a7631e884102d |
|
MD5 | dc7773be4a9b458de57d505bfe8dfad7 |
|
BLAKE2b-256 | a8ee13d1a1d331d22534bf8ce7d9c4ecc6d30b3b7534fa7fd0710c49b7b982da |