{ "info": { "author": "Steve Henderson", "author_email": "steve.henderson@hendotech.com.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "taskq\n=====\n\nPriority queue with task categorisation support\n\n|build_status| |pypi_version|\n\nOverview\n--------\n``taskq`` is a heap based priority queue that adds support to\npartition tasks into categories for selective removal.\n\nThe main driver for the project was work/task queueing where jobs\nneed to be distributed to workers with different capabilities and \nnon-uniform processing times (for calculating efficient prefetch).\n\nThis library is not thread-safe and is not intended as a replacement\nfor python's *queue.Queue* class.\n\nGetting Started\n---------------\nInstall using ``pip``: ::\n\n\tpip install taskq\n\n\nBasic FIFO usage: ::\n\n\t>>> from taskq import Queue\n\t>>> q = Queue()\n\t>>> q.push('task1')\n\t>>> q.push('task2')\n\t>>> q.pop()\n\t'task1'\n\t>>> q.pop()\n\t'task2'\n\nTask priorities (complex types that define __cmp__ are also supported): ::\n\n\t>>> from taskq import Queue\n\t>>> q = Queue()\n\t>>> q.push('task1', 2)\n\t>>> q.push('task2', 1)\n\t>>> q.pop()\n\t'task2'\n\t>>> q.pop()\n\t'task1'\n\nMulti-pop: ::\n\n\t>>> from taskq import Queue\n\t>>> q = Queue()\n\t>>> q.push('task1')\n\t>>> q.push('task2')\n\t>>> q.push('task3')\n\t>>> q.pop(2)\n\t['task1', 'task2']\n\nTask categories: :: \n\n\t>>> from taskq import Queue\n\t>>> q = Queue()\n\t>>> q.push('task1', category='foo')\n\t>>> q.push('task2', category='bar')\n\t>>> q.push('task3', category='foo')\n\t>>> q.pop(2, categories=['dog', 'foo'])\n\t['task1', 'task2']\n\nCategory ratios: ::\n\n\t>>> from taskq import Queue\n\t>>> q = Queue()\n\t>>> q.push('task1', category='foo')\n\t>>> q.push('task2', category='bar')\n\t>>> q.push('task3', category='foo')\n\t>>> q.pop(2, categories=['bar', 'foo'], ratios=[1, 0.5])\n\t['task1', 'task2', 'task3']\n\nThe above example is useful when prefetching/distributing tasks that have \nnon-uniform processing durations. If the category ratios represent \naverage duration in seconds, the count can be used to pull approximately \ncount seconds worth of the higest priority tasks from the queue.\n\nSee source documentation for other feature examples.\n\nIssues\n------\n\nSource code for ``taskq`` is hosted on `GitHub`_. Any bug reports or feature\nrequests can be made using GitHub's `issues system`_.\n\n.. _GitHub: https://github.com/shendo/taskq\n.. _issues system: https://github.com/shendo/taskq/issues\n\n.. |build_status| image:: https://secure.travis-ci.org/shendo/taskq.png?branch=master\n :target: https://travis-ci.org/shendo/taskq\n :alt: Current build status\n\n.. |pypi_version| image:: https://pypip.in/v/taskq/badge.png\n :target: https://pypi.python.org/pypi/taskq\n :alt: Latest PyPI version", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/shendo/taskq", "keywords": null, "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "taskq", "package_url": "https://pypi.org/project/taskq/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/taskq/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/shendo/taskq" }, "release_url": "https://pypi.org/project/taskq/0.3/", "requires_dist": null, "requires_python": null, "summary": "Priority queue with task categorisation support", "version": "0.3" }, "last_serial": 1185350, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "37028b7b35e0a2bca9dd9c73693c12cd", "sha256": "4e830b5c84b08c49de19015b0e1531aec7cee93386b46f073130018f58c866d4" }, "downloads": -1, "filename": "taskq-0.1.tar.gz", "has_sig": false, "md5_digest": "37028b7b35e0a2bca9dd9c73693c12cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16613, "upload_time": "2014-06-30T14:08:22", "url": "https://files.pythonhosted.org/packages/1e/d8/4b78391c80b49481ea5d9c9d08d8a55b32274e8421b343d496ed39314743/taskq-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "906171638a92d28a877ab484049acaba", "sha256": "71f84f3d10fd9cf0c1e8e22b051633dd46eff163b803f61259bc178abe997571" }, "downloads": -1, "filename": "taskq-0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "906171638a92d28a877ab484049acaba", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8702, "upload_time": "2014-08-03T10:30:00", "url": "https://files.pythonhosted.org/packages/ea/b2/09a0033f85bf7179be27205f441ac2faafcbc9e9e1bb801c19590c34334b/taskq-0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da02d85bda47871ca4f1815dd4d89c16", "sha256": "dbc000ba2432aa2a8750fbc3da41dde6b0bb7a39a4629f65f8af9f2385b46db7" }, "downloads": -1, "filename": "taskq-0.2.tar.gz", "has_sig": false, "md5_digest": "da02d85bda47871ca4f1815dd4d89c16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16474, "upload_time": "2014-08-03T10:29:56", "url": "https://files.pythonhosted.org/packages/13/66/0b2ea5b5342e1c049db93f07a9ca9b318f1bc19d2933320555f48e275422/taskq-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "02e00fc41e05012f1fd34ad4c872ea9d", "sha256": "bc8c7b5f5ea17127d93dae804acd0ddd036e6505c0e28a936b0dbd73484fe9c3" }, "downloads": -1, "filename": "taskq-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "02e00fc41e05012f1fd34ad4c872ea9d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8794, "upload_time": "2014-08-10T03:53:20", "url": "https://files.pythonhosted.org/packages/c3/fb/47c7cf62789ec3fcd90d462f5b8691fe448586eebe40bcb202fd0098850a/taskq-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97c0cf2873b149d3effc83a98d94b944", "sha256": "24ce799f0359d2d7081b12fcdab31adf3b5cda2886ba9000f9c09f627541c16f" }, "downloads": -1, "filename": "taskq-0.3.tar.gz", "has_sig": false, "md5_digest": "97c0cf2873b149d3effc83a98d94b944", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16849, "upload_time": "2014-08-10T03:53:17", "url": "https://files.pythonhosted.org/packages/83/41/6b4bb212e1fd91ff114057056dc0e8b58fb0972293ccf5442b6767829059/taskq-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02e00fc41e05012f1fd34ad4c872ea9d", "sha256": "bc8c7b5f5ea17127d93dae804acd0ddd036e6505c0e28a936b0dbd73484fe9c3" }, "downloads": -1, "filename": "taskq-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "02e00fc41e05012f1fd34ad4c872ea9d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8794, "upload_time": "2014-08-10T03:53:20", "url": "https://files.pythonhosted.org/packages/c3/fb/47c7cf62789ec3fcd90d462f5b8691fe448586eebe40bcb202fd0098850a/taskq-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97c0cf2873b149d3effc83a98d94b944", "sha256": "24ce799f0359d2d7081b12fcdab31adf3b5cda2886ba9000f9c09f627541c16f" }, "downloads": -1, "filename": "taskq-0.3.tar.gz", "has_sig": false, "md5_digest": "97c0cf2873b149d3effc83a98d94b944", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16849, "upload_time": "2014-08-10T03:53:17", "url": "https://files.pythonhosted.org/packages/83/41/6b4bb212e1fd91ff114057056dc0e8b58fb0972293ccf5442b6767829059/taskq-0.3.tar.gz" } ] }