Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redis-bloom-filter-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

redis_bloom_filter-1.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for redis-bloom-filter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 502d1b86d9c8a463fc94aeb43dbe3e3878396fa7610bed631e2bc558830d7d64
MD5 29897c076937465ad9986ab44a7ed6cb
BLAKE2b-256 c41911c3713d3771785972104cd44a5ed517d566bb3ca8cc29256452158d242f

See more details on using hashes here.

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

Hashes for redis_bloom_filter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee4e0996c090806ee457b3a5a7e3d32d4ae2c98221f59d2f461a7631e884102d
MD5 dc7773be4a9b458de57d505bfe8dfad7
BLAKE2b-256 a8ee13d1a1d331d22534bf8ce7d9c4ecc6d30b3b7534fa7fd0710c49b7b982da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page