Cuckoo Filter implementation using Python
Project description
cuckoofilter
=========
Cuckoofilter is an implementation of Cuckoo Filter using Python, which is thread-safe.
Besides, the package can both be used in python2.x and python3.x.
Cuckoo Filter
---------
Cuckoo filter first appeared in the paper
`Cuckoo Filter: Practically Better Than Bloom <https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf>`_
by Bin Fan,David G. Andersen, Michael Kaminsky and Michael D. Mitzenmacher, which is used to
replace Bloom filters for approximate set membership tests. Cuckoo filters support
adding and removing items dynamically while achieving even higher performance than
Bloom filters. For applications that store many items and target moderately low
false positive rates, cuckoo filters have lower space overhead than space-optimized
Bloom filters.
To know more details of Cuckoo Filter, please read the paper.
Installation
---------
Install cuckoofilter:
.. code-block::
$ pip install cuckoopy
Or
.. code-block::
$ pip3 install cuckoopy
Usage
---------
.. code-block:: python
>>> import cuckoofilter
>>> cf = cuckoofilter.CuckooFilter(capacity=100, fingerprint_size=1)
>>> cf.insert('test')
True
>>> cf.contains('test')
True
>>> cf.delete('test')
True
Testing
---------
To test the package and generate a test coverage report, you should run
.. code-block::
$ pip install pytest coverage pytest-cov
$ pytest -v -cov=cuckoofilter --cov-report html
Or
.. code-block::
$ pip3 install pytest coverage pytest-cov
$ python3 -m pytest .
License
---------
`GPL-3.0 License <https://github.com/shenaishiren/cuckoofilter/blob/master/LICENSE>`_
=========
Cuckoofilter is an implementation of Cuckoo Filter using Python, which is thread-safe.
Besides, the package can both be used in python2.x and python3.x.
Cuckoo Filter
---------
Cuckoo filter first appeared in the paper
`Cuckoo Filter: Practically Better Than Bloom <https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf>`_
by Bin Fan,David G. Andersen, Michael Kaminsky and Michael D. Mitzenmacher, which is used to
replace Bloom filters for approximate set membership tests. Cuckoo filters support
adding and removing items dynamically while achieving even higher performance than
Bloom filters. For applications that store many items and target moderately low
false positive rates, cuckoo filters have lower space overhead than space-optimized
Bloom filters.
To know more details of Cuckoo Filter, please read the paper.
Installation
---------
Install cuckoofilter:
.. code-block::
$ pip install cuckoopy
Or
.. code-block::
$ pip3 install cuckoopy
Usage
---------
.. code-block:: python
>>> import cuckoofilter
>>> cf = cuckoofilter.CuckooFilter(capacity=100, fingerprint_size=1)
>>> cf.insert('test')
True
>>> cf.contains('test')
True
>>> cf.delete('test')
True
Testing
---------
To test the package and generate a test coverage report, you should run
.. code-block::
$ pip install pytest coverage pytest-cov
$ pytest -v -cov=cuckoofilter --cov-report html
Or
.. code-block::
$ pip3 install pytest coverage pytest-cov
$ python3 -m pytest .
License
---------
`GPL-3.0 License <https://github.com/shenaishiren/cuckoofilter/blob/master/LICENSE>`_
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
cuckoofilter-0.0.0.1.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for cuckoofilter-0.0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e39495225affac548fa208afaa88d8fdcea4d6404a463044adbb1063ba331e2d |
|
MD5 | cc7bac933e9709c835570f4745a79dc3 |
|
BLAKE2b-256 | 789866c479eaeb5dec9f9c52d18f3e3f6e05b4311657d257be494a4623f05224 |