{ "info": { "author": "Tyler Barrus", "author_email": "barrust@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "PyProbables\n===========\n\n.. image:: https://badge.fury.io/py/pyprobables.svg\n :target: https://badge.fury.io/py/pyprobables\n.. image:: https://coveralls.io/repos/github/barrust/pyprobables/badge.svg\n :target: https://coveralls.io/github/barrust/pyprobables\n.. image:: https://travis-ci.org/barrust/pyprobables.svg?branch=master\n :target: https://travis-ci.org/barrust/pyprobables\n.. image:: https://readthedocs.org/projects/pyprobables/badge/?version=latest\n :target: http://pyprobables.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: https://opensource.org/licenses/MIT/\n :alt: License\n.. image:: https://pepy.tech/badge/pyprobables\n :target: https://pepy.tech/project/pyprobables\n :alt: Downloads\n\n**pyprobables** is a pure-python library for probabilistic data structures.\nThe goal is to provide the developer with a pure-python implementation of\ncommon probabilistic data-structures to use in their work.\n\nTo achieve better raw performance, it is recommended supplying an alternative\nhashing algorithm that has been compiled in C. This could include using the\nmd5 and sha512 algorithms provided or installing a third party package and\nwriting your own hashing strategy. Some options include the murmur hash\n`mmh3 `__ or those from the\n`pyhash `__ library. Each data object in\n**pyprobables** makes it easy to pass in a custom hashing function.\n\nRead more about how to use `Supplying a pre-defined, alternative hashing strategies`_\nor `Defining hashing function using the provided decorators`_.\n\nInstallation\n------------------\n\nPip Installation:\n\n::\n\n $ pip install pyprobables\n\nTo install from source:\n\nTo install `pyprobables`, simply clone the `repository on GitHub\n`__, then run from the folder:\n\n::\n\n $ python setup.py install\n\n`pyprobables` supports python versions 2.7 and 3.3 - 3.6\n\n\nAPI Documentation\n---------------------\n\nThe documentation of is hosted on\n`readthedocs.io `__\n\nYou can build the documentation locally by running:\n\n::\n\n $ pip install sphinx\n $ cd docs/\n $ make html\n\n\n\nAutomated Tests\n------------------\n\nTo run automated tests, one must simply run the following command from the\ndownloaded folder:\n\n::\n\n $ python setup.py test\n\n\n\nQuickstart\n------------------\n\nImport pyprobables and setup a Bloom Filter\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n from probables import (BloomFilter)\n blm = BloomFilter(est_elements=1000, false_positive_rate=0.05)\n blm.add('google.com')\n blm.check('facebook.com') # should return False\n blm.check('google.com') # should return True\n\n\nImport pyprobables and setup a Count-Min Sketch\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n from probables import (CountMinSketch)\n cms = CountMinSketch(width=1000, depth=5)\n cms.add('google.com') # should return 1\n cms.add('facebook.com', 25) # insert 25 at once; should return 25\n\n\nImport pyprobables and setup a Cuckoo Filter\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n from probables import (CuckooFilter)\n cko = CuckooFilter(capacity=100, max_swaps=10)\n cko.add('google.com')\n cko.check('facebook.com') # should return False\n cko.check('google.com') # should return True\n\n\nSupplying a pre-defined, alternative hashing strategies\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n from probables import (BloomFilter)\n from probables.hashes import (default_sha256)\n blm = BloomFilter(est_elements=1000, false_positive_rate=0.05,\n hash_function=default_sha256)\n blm.add('google.com')\n blm.check('facebook.com') # should return False\n blm.check('google.com') # should return True\n\n\n.. _use-custom-hashing-strategies:\n\nDefining hashing function using the provided decorators\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n import mmh3 # murmur hash 3 implementation (pip install mmh3)\n from pyprobables.hashes import (hash_with_depth_bytes)\n from pyprobables import (BloomFilter)\n\n @hash_with_depth_bytes\n def my_hash(key):\n return mmh3.hash_bytes(key)\n\n blm = BloomFilter(est_elements=1000, false_positive_rate=0.05, hash_function=my_hash)\n\n.. code:: python\n\n import mmh3 # murmur hash 3 implementation (pip install mmh3)\n from pyprobables.hashes import (hash_with_depth_int)\n from pyprobables import (BloomFilter)\n\n @hash_with_depth_int\n def my_hash(key, encoding='utf-8'):\n max64mod = UINT64_T_MAX + 1\n val = int(hashlib.sha512(key.encode(encoding)).hexdigest(), 16)\n return val % max64mod\n\n blm = BloomFilter(est_elements=1000, false_positive_rate=0.05, hash_function=my_hash)\n\n\nSee the `API documentation `__\nfor other data structures available and the\n`quickstart page `__\nfor more examples!\n\n\nChangelog\n------------------\n\nPlease see the `changelog\n`__ for a list\nof all changes.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/barrust/pyprobables/tarball/v0.3.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/barrust/pyprobables", "keywords": "python probabilistic data-structure bloom filter count-min sketch bloom-filter count-min-sketch cuckoo-filter", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyprobables", "package_url": "https://pypi.org/project/pyprobables/", "platform": "", "project_url": "https://pypi.org/project/pyprobables/", "project_urls": { "Download": "https://github.com/barrust/pyprobables/tarball/v0.3.0", "Homepage": "https://github.com/barrust/pyprobables" }, "release_url": "https://pypi.org/project/pyprobables/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Probabilistic data structures in python", "version": "0.3.0" }, "last_serial": 4510382, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5bc7cdf1aef4eed8ce4f64f884d7bb4d", "sha256": "8f093709e0dc55fd318569d0160daaffbd19e28d3bdb284ed6c1b02fa7f38125" }, "downloads": -1, "filename": "pyprobables-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5bc7cdf1aef4eed8ce4f64f884d7bb4d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5915, "upload_time": "2017-07-14T16:07:36", "url": "https://files.pythonhosted.org/packages/d9/da/6faa323de778f890128b70a9055eb05dd8dd5f51325047eba09d5f456aff/pyprobables-0.0.1-py2.py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "9157ff648026d22b7d4b54bcbab591a3", "sha256": "6b9a9a12c0bf9d0ec307cf366e75b7cb54c7d2fe205526c866f62780879e2f15" }, "downloads": -1, "filename": "pyprobables-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9157ff648026d22b7d4b54bcbab591a3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5914, "upload_time": "2017-07-15T16:52:26", "url": "https://files.pythonhosted.org/packages/f9/f0/4ce415633be078a34af4c5a41412aabf4cc69312f176d2d69309c92d76e7/pyprobables-0.0.4-py2.py3-none-any.whl" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "843156af5e8ae0bd19bff0f2a570b212", "sha256": "8a3216598e0a189641a1eafe63eab88285dd404a47cc7cf8ebbe8db0f722539c" }, "downloads": -1, "filename": "pyprobables-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "843156af5e8ae0bd19bff0f2a570b212", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6386, "upload_time": "2017-07-21T23:13:17", "url": "https://files.pythonhosted.org/packages/bc/de/7e1dbf4c4ccf7f4f4e8586966f2c57ed83875fdf4c1287eb50799c0cc915/pyprobables-0.0.5-py2.py3-none-any.whl" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d87802fb3e8086f26578a9ce07947813", "sha256": "0ac758b278ee8f0d95e01c66694038e45189d25d3df3f42be65c648a552aee62" }, "downloads": -1, "filename": "pyprobables-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d87802fb3e8086f26578a9ce07947813", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6432, "upload_time": "2017-08-05T22:19:35", "url": "https://files.pythonhosted.org/packages/b0/e0/e587bbd637ead7fd76d0dc7515f7d64085ad15ba1861e0ffa5287adce889/pyprobables-0.0.6-py2.py3-none-any.whl" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "33149ad87736f582cd7087298ddaeee4", "sha256": "7c4e7dd6380ca2e6e824562910791670661507461875d8f316f103352ffa0c1d" }, "downloads": -1, "filename": "pyprobables-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "33149ad87736f582cd7087298ddaeee4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6433, "upload_time": "2017-08-12T16:04:15", "url": "https://files.pythonhosted.org/packages/29/eb/52bcfe5912c1d532ef508d5f6c0ef9c5f732a65b1e136c06960fb6516fb3/pyprobables-0.0.7-py2.py3-none-any.whl" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "c6863c1b9ae065befd514dc19c0baec5", "sha256": "b5eebf1c4cc7dc7c77730ed736ed153d64bf32af7968558038d32de31fa25bd8" }, "downloads": -1, "filename": "pyprobables-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6863c1b9ae065befd514dc19c0baec5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6433, "upload_time": "2017-08-22T00:01:17", "url": "https://files.pythonhosted.org/packages/22/d2/e8d5fbea9d623974fdf8d71296afc6d72f060c67ffe6dd52c889174df6e8/pyprobables-0.0.8-py2.py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "ec4c9c6189020299509f2d2a00c501cc", "sha256": "8026376bde09f7a400e637c390845b70cce33db29719b4b6dbde2fcb46bee503" }, "downloads": -1, "filename": "pyprobables-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ec4c9c6189020299509f2d2a00c501cc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6732, "upload_time": "2017-09-29T20:25:22", "url": "https://files.pythonhosted.org/packages/8f/ae/42d0319061a56f17817f8a43c8fde6f0747e442ba2820a15b4096ae9487e/pyprobables-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1141cc474051397180539b9f918add21", "sha256": "36b8486ef81da480835466b848e92bfb0b1decd9a5169b12b235831305b552cf" }, "downloads": -1, "filename": "pyprobables-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1141cc474051397180539b9f918add21", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7055, "upload_time": "2017-10-04T00:25:31", "url": "https://files.pythonhosted.org/packages/3c/19/8c414bc1b1d8f54f129abebd1f41a8a4c58b14f1815494fb53cda3801e7b/pyprobables-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ff4b013f7fa0e6486a9e23c0146a16c6", "sha256": "6b3cbf00d6bd46e7336833984c2cffc45361ac64d5f128e9e8640c7d94da2f33" }, "downloads": -1, "filename": "pyprobables-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff4b013f7fa0e6486a9e23c0146a16c6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27947, "upload_time": "2017-10-09T21:37:56", "url": "https://files.pythonhosted.org/packages/72/07/7533bd75a2c3ee7dc730ac6c491d84c63491c9d341bd2271f1219dc0687b/pyprobables-0.1.2-py2.py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "bd3ddd83838e00ac4e8086784bd13d7a", "sha256": "ca44867d27b7ce71c0ae22cd2dc53f91e6a62a6362237a87e8ae0a94ed948481" }, "downloads": -1, "filename": "pyprobables-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bd3ddd83838e00ac4e8086784bd13d7a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30224, "upload_time": "2018-01-02T01:34:17", "url": "https://files.pythonhosted.org/packages/09/0a/df5022ce124674a5bac1f1dbfddb9e27b58a459e48eebb610b3c8fb4e232/pyprobables-0.1.3-py2.py3-none-any.whl" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "d7a00a0b11cf194a9be30d1f754d9295", "sha256": "6c10900f886e1da304bcd9d8ff6edcd295f86d74ab513f5631876dcb0f3733d3" }, "downloads": -1, "filename": "pyprobables-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d7a00a0b11cf194a9be30d1f754d9295", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30259, "upload_time": "2018-05-25T15:07:52", "url": "https://files.pythonhosted.org/packages/41/f6/6b4aeb91a0172d64702f8ba832a32b1a046fc64ee9a9cfbe01ff6b8c6bdf/pyprobables-0.1.4-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "16a97c8b0b5fd55bce04bf1533f7690e", "sha256": "c3f35d0b7de2bc92342a5a1cc7f3138c3166f53d0a062b9e20f016fbaedae093" }, "downloads": -1, "filename": "pyprobables-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "16a97c8b0b5fd55bce04bf1533f7690e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30544, "upload_time": "2018-11-07T01:09:58", "url": "https://files.pythonhosted.org/packages/89/78/dc1ff1c2d820d41e14414c6e063f9efe49439e37f90d5cd928e0d10226a1/pyprobables-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85f87315f82214a376a2203b4fcd3ab8", "sha256": "40c212c6bb22f2da1e3ce57827ad29bed94aa5184471b3629c64de9c46098a3c" }, "downloads": -1, "filename": "pyprobables-0.2.0.tar.gz", "has_sig": false, "md5_digest": "85f87315f82214a376a2203b4fcd3ab8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21734, "upload_time": "2018-11-07T01:10:00", "url": "https://files.pythonhosted.org/packages/9c/1f/c961e01c1c49d4fcc0ea01ef31fd8d17b87c8e87ab1d7c9f448fd61d76c9/pyprobables-0.2.0.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "e43e5fef7d766ef83176bae77fd1d29d", "sha256": "a38ab3f683ab24387d23d8f583e889e461f9596ac3fd29b58ee942e6236e4e15" }, "downloads": -1, "filename": "pyprobables-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e43e5fef7d766ef83176bae77fd1d29d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32052, "upload_time": "2018-11-10T23:40:09", "url": "https://files.pythonhosted.org/packages/79/19/dd65f31a3f735f848906427155fb537228878d76eb6ad470be259955b81e/pyprobables-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d5ea103b8cc7b7a60fc941131cff282", "sha256": "0d727fb948c79c66b7a62bfa3501dccc96b4f7946d04ab5c21d067184359ae41" }, "downloads": -1, "filename": "pyprobables-0.2.5.tar.gz", "has_sig": false, "md5_digest": "7d5ea103b8cc7b7a60fc941131cff282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22341, "upload_time": "2018-11-10T23:40:11", "url": "https://files.pythonhosted.org/packages/d6/8c/53dbcc9d63ddad187fbddb306d9001dc84ec5d67143eba7a232b86f72d1d/pyprobables-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "749f718513a2a5270109da91d7460f80", "sha256": "e6df7e8959a5f18a535815a96aa945b2fd2c00ab846820c73cf046f82c861a7b" }, "downloads": -1, "filename": "pyprobables-0.2.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "749f718513a2a5270109da91d7460f80", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32644, "upload_time": "2018-11-12T18:50:10", "url": "https://files.pythonhosted.org/packages/f6/a4/02511ecd9eb10a1f6b7bf40a2c7aebb624068232017cf4f531dc7a4afb90/pyprobables-0.2.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b47f7b120922d2b23e403cdb941629e2", "sha256": "8b1a0a935d20194e7f3d612326de62f2c395613ea288c398f5568852b571ff6d" }, "downloads": -1, "filename": "pyprobables-0.2.6.tar.gz", "has_sig": false, "md5_digest": "b47f7b120922d2b23e403cdb941629e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22967, "upload_time": "2018-11-12T18:50:12", "url": "https://files.pythonhosted.org/packages/b7/54/8af0ed7d922de1b14a2e2d4dda29057e970f8ae44a52e0a30a443722da4f/pyprobables-0.2.6.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "d94554da932ef86aa9a6077fad9caa87", "sha256": "5283178ee6476d9e4018717638c22d00bd8ba1bb486dcf7015856bc151fe1d4a" }, "downloads": -1, "filename": "pyprobables-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d94554da932ef86aa9a6077fad9caa87", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31689, "upload_time": "2018-11-21T01:53:33", "url": "https://files.pythonhosted.org/packages/ce/84/b46f813ddc64ff4010d1937ed8f6dcccfa65b1992f5c59f4c1b6f8126727/pyprobables-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46c172366da94e18ce8bcf5b9bdb94d0", "sha256": "c65f1a6deaf3ae75541efecc4bfe7e02e463deb91dc3c2e635919c434d80f77c" }, "downloads": -1, "filename": "pyprobables-0.3.0.tar.gz", "has_sig": false, "md5_digest": "46c172366da94e18ce8bcf5b9bdb94d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23330, "upload_time": "2018-11-21T01:53:35", "url": "https://files.pythonhosted.org/packages/c9/74/a973ef156fdef093b75613ac7a473c9e9582d92e09e4038be2c594a8b669/pyprobables-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d94554da932ef86aa9a6077fad9caa87", "sha256": "5283178ee6476d9e4018717638c22d00bd8ba1bb486dcf7015856bc151fe1d4a" }, "downloads": -1, "filename": "pyprobables-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d94554da932ef86aa9a6077fad9caa87", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31689, "upload_time": "2018-11-21T01:53:33", "url": "https://files.pythonhosted.org/packages/ce/84/b46f813ddc64ff4010d1937ed8f6dcccfa65b1992f5c59f4c1b6f8126727/pyprobables-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46c172366da94e18ce8bcf5b9bdb94d0", "sha256": "c65f1a6deaf3ae75541efecc4bfe7e02e463deb91dc3c2e635919c434d80f77c" }, "downloads": -1, "filename": "pyprobables-0.3.0.tar.gz", "has_sig": false, "md5_digest": "46c172366da94e18ce8bcf5b9bdb94d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23330, "upload_time": "2018-11-21T01:53:35", "url": "https://files.pythonhosted.org/packages/c9/74/a973ef156fdef093b75613ac7a473c9e9582d92e09e4038be2c594a8b669/pyprobables-0.3.0.tar.gz" } ] }