{ "info": { "author": "Sri Panyam", "author_email": "sri.panyam@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent" ], "description": "PriorityQ\n---------\n\nPriorityQ is a library for managing a priority queue (PQ) with a cleaner API to enable custom comparators, \nfinding references to values efficiently (in constant time) and deleting values from the PQ. This was \ndeveloped because the current heapq module (in python's standard library) does not provide an efficient\nfind operation (it is O(n)) and has no easy way to deleting an element and ensuring the heap invariant\nafterwards.\n\nFeatures\n````````\n\n* O(1) finding of elements\n* Deletion of elements possible (in O(log n)).\n* Adjusting of the priority of an element without requiring a deletion followed by an insertion.\n* Opaque handles to elements that can be used to reference to the same item again.\n* Duplicate elements allowed.\n* Custom comparator function can be passed to the PQ itself instead of needing to implement __cmp__.\n\nIt is simple to use\n```````````````````\n\nTo create a PQ simply do:\n\n.. code:: python\n\n # A simple object with a comparator\n class Item(object):\n def __init__(self, value):\n self.value = value\n def __cmp__(self, another):\n return cmp(self.value, another.value)\n\n from priorityq import PQ\n pq = PQ()\n pq.heapify([Item(r) for r in [1, 10, 2, 20, 4, 7, 9, 3, 5, 6]])\n\n print list(pq)\n\n # Should print:\n # 1 2 3 4 5 6 7 9 10 20\n\n handle_10 = pq.find(10) # Happens in O(1)\n\n handle_10.value = 25 # Modify its value - O(log n)\n pq.adjust(handle_10) # Indicate to the heap to reprioritise/adjust it\n\n print list(pq)\n\n # Should print:\n # 1 2 3 4 5 6 7 9 20 25\n\n handle_10.value = 10 # Modify its value using the same opaque handle as before\n pq.adjust(handle_10) # Indicate to the heap to reprioritise/adjust it\n\n print list(pq)\n\n # Should print:\n # 1 2 3 4 5 6 7 9 10 20\n\nLinks\n`````\n* `Documentation `_\n* `Website `_", "description_content_type": null, "docs_url": "https://pythonhosted.org/priorityq/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/panyam/priorityq", "keywords": "priority queue,binary heap,heap,mutable heap,data structures", "license": "", "maintainer": "", "maintainer_email": "", "name": "priorityq", "package_url": "https://pypi.org/project/priorityq/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/priorityq/", "project_urls": { "Homepage": "https://github.com/panyam/priorityq" }, "release_url": "https://pypi.org/project/priorityq/0.0.9/", "requires_dist": [ "Sphinx (>=1.1); extra == 'docs'" ], "requires_python": "", "summary": "A flexible priority queue library with support for pluggable storage strategies and fast lookups and mutability.", "version": "0.0.9" }, "last_serial": 2678248, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7eb8e1d567d8254c78ad9889637f76a0", "sha256": "2ef243afbbabf13209da9f17b3b40d18464d786239a88fbcd12f9a8ef609249d" }, "downloads": -1, "filename": "priorityq-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7eb8e1d567d8254c78ad9889637f76a0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2938, "upload_time": "2017-02-07T14:06:10", "url": "https://files.pythonhosted.org/packages/dc/73/842eef6ccc62835c45aaca24fd9b6281d6bc3d54be4ff9f2597166ad9dfc/priorityq-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "15322950a8e3af1e8ad260026836f1e9", "sha256": "88412a0c1a4f5b712fa248178941c96f4f4ec2ec84188a914c102eead2962c85" }, "downloads": -1, "filename": "priorityq-0.0.1.tar.gz", "has_sig": false, "md5_digest": "15322950a8e3af1e8ad260026836f1e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2208, "upload_time": "2017-02-07T14:06:12", "url": "https://files.pythonhosted.org/packages/85/4a/9536ad5d2c7f029ce54606a459a19534829a7f8af2be48e9f61720b82d7b/priorityq-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "777f9ae0431f538da99abf0ee9e12ac4", "sha256": "98fc459c6e314b00c26ce4eaf8a5db66a7820fb07e3b509f8ea5e84ed052f3c3" }, "downloads": -1, "filename": "priorityq-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "777f9ae0431f538da99abf0ee9e12ac4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3234, "upload_time": "2017-02-08T23:29:21", "url": "https://files.pythonhosted.org/packages/a4/27/e25b760320cb229b9dc0990391c3f5c64c827b87d8590d5a136dd6e00201/priorityq-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f76b111ee8fc37e0b97c1595f0841f16", "sha256": "59548ce77f207a5ab57411bf4ef838f1e1db73ee3831745211f980c39126ee53" }, "downloads": -1, "filename": "priorityq-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f76b111ee8fc37e0b97c1595f0841f16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2356, "upload_time": "2017-02-08T23:29:23", "url": "https://files.pythonhosted.org/packages/95/a0/8420112e86f0fa502036bb8d651e234c91a92a6430207404787467be685b/priorityq-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "36ff4f234ee5e01eb9cb32790d88ab1f", "sha256": "893b1efc7dcb024d998d509f8c3c29b4b2896fd57e2b793590e5b3e18ad4d6b9" }, "downloads": -1, "filename": "priorityq-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "36ff4f234ee5e01eb9cb32790d88ab1f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3238, "upload_time": "2017-02-12T19:04:39", "url": "https://files.pythonhosted.org/packages/0d/65/a373e0ca1b545d082a202e6f2cd287354961193ebc5848347d828b777f70/priorityq-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6dfb16e693f3edd55252b329fdf90344", "sha256": "4500f7cb3a7d888b0344dcf88ebeba33c716270267011ff630dcb79618b1640c" }, "downloads": -1, "filename": "priorityq-0.0.3.tar.gz", "has_sig": false, "md5_digest": "6dfb16e693f3edd55252b329fdf90344", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2359, "upload_time": "2017-02-12T19:04:41", "url": "https://files.pythonhosted.org/packages/df/c3/e8ac78acd771f81261c0c4bd385462d424a49bd6d16568bb627d3d873c25/priorityq-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "0ec3feaa8f3f7bbe5f41b8ca0fd01c47", "sha256": "a3c1e1c372c6faa97758cae3acf6231e574af0d48e167b7e430795b6ca6c8f24" }, "downloads": -1, "filename": "priorityq-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0ec3feaa8f3f7bbe5f41b8ca0fd01c47", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3414, "upload_time": "2017-02-14T15:01:17", "url": "https://files.pythonhosted.org/packages/e5/f6/40146bad36f8841ef20fe04328522a4ee73c8f5f3a6d976fbdf6394d98f9/priorityq-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bdfea2dd0357a3f62b4d8ecf89d4a966", "sha256": "b640788fdd1300258c608eb8f03e0dbf05841736871a5070ae16864df16515d0" }, "downloads": -1, "filename": "priorityq-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bdfea2dd0357a3f62b4d8ecf89d4a966", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3395, "upload_time": "2017-02-14T15:01:19", "url": "https://files.pythonhosted.org/packages/b2/23/ac30528c979ea51500ccbfed760ed80ae082a3e14295302f5132f5a1eb20/priorityq-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "d257471fc5407eff51f2a21b77ceae9f", "sha256": "cd9ac54f5cec3c67bbbdf19b15ae0bc653332a31459ad2c8078b0ef38eea5961" }, "downloads": -1, "filename": "priorityq-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d257471fc5407eff51f2a21b77ceae9f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12999, "upload_time": "2017-02-15T18:12:52", "url": "https://files.pythonhosted.org/packages/cb/7b/99cbb97d3e3138b83f645c78ae582cbfaba1b43481feff22210d1222ec49/priorityq-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "360bdb6c86f055a181effa4a94612f1e", "sha256": "617eb9d65d97aca94541b2de13acebdcb1f8d8c269e22a46e6bab076a55b10fd" }, "downloads": -1, "filename": "priorityq-0.0.5.tar.gz", "has_sig": false, "md5_digest": "360bdb6c86f055a181effa4a94612f1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6577, "upload_time": "2017-02-15T18:12:54", "url": "https://files.pythonhosted.org/packages/1f/bc/12c0c42954cd3ce1961608259f1dc22620d48d435d0999dfe8ebecbc1c48/priorityq-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d785eb7560606fc7822d59b21bb17ac8", "sha256": "dae2f1d1b650cccdfe75aae744f7ade599d34bb2ddd069270002d964e01e4e20" }, "downloads": -1, "filename": "priorityq-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d785eb7560606fc7822d59b21bb17ac8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17912, "upload_time": "2017-02-17T15:26:57", "url": "https://files.pythonhosted.org/packages/0c/b8/f46b5e5f21cb285d140787df09aa6f12789b05339ae66d537751d0ae3c5c/priorityq-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a827da92fdd93eead005fb389fe8ea15", "sha256": "011efaa9aa3e3b8215d418d488059ba5fbff41bc8d306f8bbbd1e4e2ac2a03c1" }, "downloads": -1, "filename": "priorityq-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a827da92fdd93eead005fb389fe8ea15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8013, "upload_time": "2017-02-17T15:26:59", "url": "https://files.pythonhosted.org/packages/b5/2c/9e06a1d1f75fa7ba8c553fd24e70dccfda3fd431a82cb9ab36a050371dad/priorityq-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "216594169e0fe00708ece616d7ec428f", "sha256": "eff908e17cd463da8e54d7c9a34ce92083603e4419e7f08b0f61293322df244a" }, "downloads": -1, "filename": "priorityq-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "216594169e0fe00708ece616d7ec428f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21495, "upload_time": "2017-02-18T19:17:13", "url": "https://files.pythonhosted.org/packages/3d/c7/1ade316bcf0b1f3cb32015ae5b19aec34aa547eced929882e5fff8675ccf/priorityq-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "864710ac1607cd2f4cae328172262e2e", "sha256": "52b10d5d47277e02d9f26f1b07a21e28a92a3fb161523d46c7c6461ba5841d87" }, "downloads": -1, "filename": "priorityq-0.0.7.tar.gz", "has_sig": false, "md5_digest": "864710ac1607cd2f4cae328172262e2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10662, "upload_time": "2017-02-18T19:17:15", "url": "https://files.pythonhosted.org/packages/51/c2/235277321ef5bef7b017d42b24c5be2be9da398a0ae457f6212789b5eeaf/priorityq-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "22b58888f10094097534ad8bc38d7d4d", "sha256": "146e544cce5959005d5cbe4c646038cd73938b06f16900ae40ece36eef4d78e0" }, "downloads": -1, "filename": "priorityq-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "22b58888f10094097534ad8bc38d7d4d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21495, "upload_time": "2017-02-18T22:37:22", "url": "https://files.pythonhosted.org/packages/b2/b0/213bfcbd0372efd362f59b43b7b90dbb5c20253934f995bafd3fb15a26a2/priorityq-0.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e726c8b12a19651afd00867c653949e3", "sha256": "843d19d18a21a8bc4db075e61b7bf91cf7e2df688cc21c57830eb3749b414bb6" }, "downloads": -1, "filename": "priorityq-0.0.8.tar.gz", "has_sig": false, "md5_digest": "e726c8b12a19651afd00867c653949e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10662, "upload_time": "2017-02-18T22:37:24", "url": "https://files.pythonhosted.org/packages/e5/d4/e3c0a326a739a4b94ab5a319e4f13b41a4a3a8549af9f538fc5ae851d506/priorityq-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "164d5bad70d834b47b4d2f20bc29d945", "sha256": "b5c8cca37600adf04784e2f7fdd20e039b8f69b8c9c62b5b2222d07a416ad2e5" }, "downloads": -1, "filename": "priorityq-0.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "164d5bad70d834b47b4d2f20bc29d945", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21509, "upload_time": "2017-03-02T14:18:15", "url": "https://files.pythonhosted.org/packages/87/f8/f30580967db9407a6e6b834bf480f50cddf63c16578aabad5e06b88054e9/priorityq-0.0.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1e787341a0f2f02f02058a814271a61", "sha256": "39a786a1f2badea96b30914794ae3a8bc281ccefd451a3838bf7cb7d1fbf1b13" }, "downloads": -1, "filename": "priorityq-0.0.9.tar.gz", "has_sig": false, "md5_digest": "c1e787341a0f2f02f02058a814271a61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10691, "upload_time": "2017-03-02T14:18:17", "url": "https://files.pythonhosted.org/packages/56/ec/71249eee8f951d90033f8664ad8cf4d9f85ad58a10f75bde9ab06f0dafae/priorityq-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "164d5bad70d834b47b4d2f20bc29d945", "sha256": "b5c8cca37600adf04784e2f7fdd20e039b8f69b8c9c62b5b2222d07a416ad2e5" }, "downloads": -1, "filename": "priorityq-0.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "164d5bad70d834b47b4d2f20bc29d945", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21509, "upload_time": "2017-03-02T14:18:15", "url": "https://files.pythonhosted.org/packages/87/f8/f30580967db9407a6e6b834bf480f50cddf63c16578aabad5e06b88054e9/priorityq-0.0.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1e787341a0f2f02f02058a814271a61", "sha256": "39a786a1f2badea96b30914794ae3a8bc281ccefd451a3838bf7cb7d1fbf1b13" }, "downloads": -1, "filename": "priorityq-0.0.9.tar.gz", "has_sig": false, "md5_digest": "c1e787341a0f2f02f02058a814271a61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10691, "upload_time": "2017-03-02T14:18:17", "url": "https://files.pythonhosted.org/packages/56/ec/71249eee8f951d90033f8664ad8cf4d9f85ad58a10f75bde9ab06f0dafae/priorityq-0.0.9.tar.gz" } ] }