{ "info": { "author": "John Paton", "author_email": "john@johnpaton.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: Freely Distributable", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet" ], "description": "![Build Status](https://travis-ci.com/JohnPaton/ratelimitqueue.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/JohnPaton/ratelimitqueue/badge.svg)](https://coveralls.io/github/JohnPaton/ratelimitqueue) [![Documentation Status](https://readthedocs.org/projects/ratelimitqueue/badge/?version=latest)](https://ratelimitqueue.readthedocs.io/en/latest/?badge=latest)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# RateLimitQueue\n\nA rate limited wrapper for Python's thread safe queues.\n\nSome external APIs have rate limits that allow faster-than-consecutive queries, e.g. if the rate limit is very high or the API response is quite slow. To make the most of the API, the best option is often to make API calls from multiple threads. Then you can put the requests or URLs to call in a `queue.Queue` and have the threads consume the URLs as they make the calls. However, you still have to make sure that the total calls from all your threads don't exceed the rate limit, which requires some nontrivial coordination. \n\nThe `ratelimitqueue` package extends the three built-in Python queues from from `queue` package - `Queue`, `LifeQueue`, and `PriorityQueue` - with configurable, rate limited counterparts. Specifically, the `get()` method is rate limited across all threads so that workers can safely consume from the queue in an unlimited loop, and putting the items in the queue doesn't need to require blocking the main thread.\n\n## Installation\n\nTo get started, install it with `pip`:\n\n```bash\npip install ratelimitqueue\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/JohnPaton/ratelimitqueue", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ratelimitqueue", "package_url": "https://pypi.org/project/ratelimitqueue/", "platform": "", "project_url": "https://pypi.org/project/ratelimitqueue/", "project_urls": { "Homepage": "https://www.github.com/JohnPaton/ratelimitqueue" }, "release_url": "https://pypi.org/project/ratelimitqueue/0.2.2/", "requires_dist": null, "requires_python": ">=3.4", "summary": "A thread safe, rate limited queue.", "version": "0.2.2" }, "last_serial": 4192282, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "6029a58599374677f0b95e80e94090d6", "sha256": "fbedd869c73dd1b6d5f455da43e4da20013925bb4e4a76d1efd51bd458d446b6" }, "downloads": -1, "filename": "ratelimitqueue-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6029a58599374677f0b95e80e94090d6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 5505, "upload_time": "2018-08-19T15:47:05", "url": "https://files.pythonhosted.org/packages/51/cd/85457eef9a191cbc41a6044b631a556848a6e67ef24c3d91bd5a79f82655/ratelimitqueue-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "663418fb592893b0e913cb328596db55", "sha256": "dcf4feec1b45ebab9e3eeb401e5ac811fd662ee277adcdcee0e7da86227b7493" }, "downloads": -1, "filename": "ratelimitqueue-0.2.0.tar.gz", "has_sig": false, "md5_digest": "663418fb592893b0e913cb328596db55", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4641, "upload_time": "2018-08-19T15:47:07", "url": "https://files.pythonhosted.org/packages/bc/4b/b9db5ed310a08959779abc0e5ffec63b6927716d733bf8d2e9bb36f1b8e6/ratelimitqueue-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6f7468ca410010a6f0ac629aaf4626bd", "sha256": "79ffa2ce958f8ae5e492fa8d73cd5ad4d5b186cb0ee911c1b5b546e83ae49bd5" }, "downloads": -1, "filename": "ratelimitqueue-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6f7468ca410010a6f0ac629aaf4626bd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4538, "upload_time": "2018-08-19T16:02:56", "url": "https://files.pythonhosted.org/packages/b3/7c/aee0bc8509ce5bf2cf61be93605cceff68a1f86d275d6ba62e9da82745ae/ratelimitqueue-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "f1861b9d5df7376ed8d0bd5c1490843b", "sha256": "ae4123ef5033e2028a52e9857b213cd3e86576161d6a3fccc5e7a75cce229998" }, "downloads": -1, "filename": "ratelimitqueue-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f1861b9d5df7376ed8d0bd5c1490843b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4720, "upload_time": "2018-08-21T12:22:56", "url": "https://files.pythonhosted.org/packages/e6/63/c55beb712d49c08024e437d6881dcb69763026cb29236fe966e495ae1b7d/ratelimitqueue-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f1861b9d5df7376ed8d0bd5c1490843b", "sha256": "ae4123ef5033e2028a52e9857b213cd3e86576161d6a3fccc5e7a75cce229998" }, "downloads": -1, "filename": "ratelimitqueue-0.2.2.tar.gz", "has_sig": false, "md5_digest": "f1861b9d5df7376ed8d0bd5c1490843b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4720, "upload_time": "2018-08-21T12:22:56", "url": "https://files.pythonhosted.org/packages/e6/63/c55beb712d49c08024e437d6881dcb69763026cb29236fe966e495ae1b7d/ratelimitqueue-0.2.2.tar.gz" } ] }