项目作者: sureshsundriyal

项目描述 :
A simplistic bloomfilter implementation in pure python.
高级语言: Python
项目地址: git://github.com/sureshsundriyal/bloomfilter-python.git
创建时间: 2015-11-30T09:25:51Z
项目社区:https://github.com/sureshsundriyal/bloomfilter-python

开源协议:BSD 2-Clause "Simplified" License

下载


Build Status
Coverage Status

bloomfilter-python

A simplistic pure python bloomfilter implementation.

The bloomfilter expects the users to hash the object that is being tracked and
the resulting 128-bit hexdigest is expected to be passed in to the
Bloomfilter.add() method.

Example:

  1. >>> import bloomfilter
  2. >>> from hashlib import md5
  3. >>> dig = md5()
  4. >>> dig.update(b'hello world')
  5. >>> bf = bloomfilter.BloomFilter()
  6. >>> bf.add(dig.hexdigest())
  7. >>> dig.hexdigest() in bf
  8. True