{ "info": { "author": "Antonio Lima", "author_email": "anto87@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Ratelim\n=======\n\nRatelim is a simple Python library that limits the number of times a function can be called during a time interval. It is particularly useful when using online APIs, which commonly enforce rate limits.\n\nFeatures\n--------\n\n- Works in Py2 and Py3.\n- Greedy and patient rate limiting.\n- Preserves function signature.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n $ pip install ratelim\n\nUsage\n-----\n\nSay you want to call a function at most for ``n_calls`` during a ``n_seconds`` time interval.\n\n.. code-block:: python\n\n # 10 times in 5 seconds\n @ratelim.greedy(10, 5)\n def hello():\n print(\"hello\")\n\n\nThe ``greedy`` rate limiter calls does not delay any function call until it's really necessary.\n\nIn some scenarios, for example when crawling data from an API, you want to maximize the number\nof calls you make and you want to avoid sending them in short sequence. To this aim, we can\nuse the ``patient`` rate limiter. It distributes calls evenly between each other.\n\n.. code-block:: python\n\n # 10 times in 5 seconds\n # Gets called at most every 0.5 seconds\n @ratelim.patient(10, 5)\n def hello():\n print(\"hello\")\n\nLICENSE\n-------\n\nMIT.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/themiurgo/ratelim", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ratelim", "package_url": "https://pypi.org/project/ratelim/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ratelim/", "project_urls": { "Homepage": "http://github.com/themiurgo/ratelim" }, "release_url": "https://pypi.org/project/ratelim/0.1.6/", "requires_dist": [ "decorator" ], "requires_python": null, "summary": "Makes it easy to respect rate limits.", "version": "0.1.6" }, "last_serial": 1441374, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f490d7670989e0eaa7b5e1c382d5f3da", "sha256": "8786aea0f6382636cf3e4b8b3fcc29a1490597e103beedd96783921d70663208" }, "downloads": -1, "filename": "ratelim-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f490d7670989e0eaa7b5e1c382d5f3da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2363, "upload_time": "2014-12-21T06:43:19", "url": "https://files.pythonhosted.org/packages/0c/6f/b78467e06b017a8f9dc89c256f67b406566421d62c2a001f3a7534d6da18/ratelim-0.1.0.tar.gz" } ], "0.1.0a0": [ { "comment_text": "", "digests": { "md5": "d94ff19edd1a90c52b5592899b5419a9", "sha256": "c9645ac26cc2fb4194e8c00104398049f18ba7ac2e500233ac3a1aa7f4b6a711" }, "downloads": -1, "filename": "ratelim-0.1.0a0.tar.gz", "has_sig": false, "md5_digest": "d94ff19edd1a90c52b5592899b5419a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2291, "upload_time": "2014-12-21T06:48:34", "url": "https://files.pythonhosted.org/packages/c0/4c/0d16552272263c11655be1ab0aeebd39acebbc8f345ca2dc0267dcea14c4/ratelim-0.1.0a0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "76255804c136faaded42dd1ee7433dc4", "sha256": "a082c6afa98ca7560847dae67237221acedbd858264328548bf80aadd02a6f4f" }, "downloads": -1, "filename": "ratelim-0.1.1.tar.gz", "has_sig": false, "md5_digest": "76255804c136faaded42dd1ee7433dc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2283, "upload_time": "2014-12-21T06:51:52", "url": "https://files.pythonhosted.org/packages/10/23/cbf1dcbd2f35c99ca25fd25d4d36c1120e04dd76da88385c1d88713f883d/ratelim-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0af7f3f7043d93c5e7b4a6556f836c94", "sha256": "dea3814155540d6c0fae509fe37f152e1506b05ebaffd4fa0a9ca74e3be1ccbc" }, "downloads": -1, "filename": "ratelim-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0af7f3f7043d93c5e7b4a6556f836c94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2339, "upload_time": "2014-12-24T01:27:54", "url": "https://files.pythonhosted.org/packages/37/d4/dfd6e6aef76a7f39ebcdcfc272fb9872f48a60d222f463341dd160eacc84/ratelim-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "bae6dfddac36b017c6eb3765cef2476c", "sha256": "d1c96f36c95402bd767e7de3e96414a1f7ec0da21dabff15606d4532bab3e7f8" }, "downloads": -1, "filename": "ratelim-0.1.3.tar.gz", "has_sig": false, "md5_digest": "bae6dfddac36b017c6eb3765cef2476c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2656, "upload_time": "2014-12-28T11:13:49", "url": "https://files.pythonhosted.org/packages/61/84/9da92412dcf9096fa3a8204b327a92797fa26b42fcf43628e6b3d2035e52/ratelim-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1657e31d301f4a3b08fc574ff2c41d6f", "sha256": "423cfb2421abffddb53ca2f4359d320c4e4f21996898600450cb6dc8e6fa1818" }, "downloads": -1, "filename": "ratelim-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1657e31d301f4a3b08fc574ff2c41d6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2699, "upload_time": "2014-12-28T11:16:11", "url": "https://files.pythonhosted.org/packages/e9/e8/e638adfdfb64df3936d9f3c2b8f6d690d5078cf21d9ea68f275e124f780b/ratelim-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "3b88d3ed187c5e5079f041f8ef6bf7f4", "sha256": "db37d7c9cd2ae2615cd9ac6989711468c960dcec1bfc248826a2064e712d4e36" }, "downloads": -1, "filename": "ratelim-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3b88d3ed187c5e5079f041f8ef6bf7f4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4019, "upload_time": "2015-01-29T21:00:04", "url": "https://files.pythonhosted.org/packages/79/e8/d6ff44bd78f935db44d2ac91116765097a7ceb3627aab9d8a91f7566a229/ratelim-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd93720a49572623d728adc90da2f2cb", "sha256": "2455f16353834a142d757caa74cc01e8e9d4918d76c4ae2d618d9fdff11de0d8" }, "downloads": -1, "filename": "ratelim-0.1.5.tar.gz", "has_sig": false, "md5_digest": "dd93720a49572623d728adc90da2f2cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2792, "upload_time": "2015-02-27T18:04:00", "url": "https://files.pythonhosted.org/packages/41/04/0281850ccc935bf9fcdaa1c4b43596a2b0840472cbd686b67e063610f2be/ratelim-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "dbb786fb8abbbff7f1739cac97188cea", "sha256": "e1a7dd39e6b552b7cc7f52169cd66cdb826a1a30198e355d7016012987c9ad08" }, "downloads": -1, "filename": "ratelim-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dbb786fb8abbbff7f1739cac97188cea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4017, "upload_time": "2015-02-27T18:06:06", "url": "https://files.pythonhosted.org/packages/f2/98/7e6d147fd16a10a5f821db6e25f192265d6ecca3d82957a4fdd592cad49c/ratelim-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "91063fcac413e9faba01c9046c5134dc", "sha256": "826d32177e11f9a12831901c9fda6679fd5bbea3605910820167088f5acbb11d" }, "downloads": -1, "filename": "ratelim-0.1.6.tar.gz", "has_sig": false, "md5_digest": "91063fcac413e9faba01c9046c5134dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2793, "upload_time": "2015-02-27T18:06:08", "url": "https://files.pythonhosted.org/packages/c5/5a/e1440017bccb14523bb76356e6f3a5468386b8a9192bd901e98babd1a1ea/ratelim-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dbb786fb8abbbff7f1739cac97188cea", "sha256": "e1a7dd39e6b552b7cc7f52169cd66cdb826a1a30198e355d7016012987c9ad08" }, "downloads": -1, "filename": "ratelim-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dbb786fb8abbbff7f1739cac97188cea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4017, "upload_time": "2015-02-27T18:06:06", "url": "https://files.pythonhosted.org/packages/f2/98/7e6d147fd16a10a5f821db6e25f192265d6ecca3d82957a4fdd592cad49c/ratelim-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "91063fcac413e9faba01c9046c5134dc", "sha256": "826d32177e11f9a12831901c9fda6679fd5bbea3605910820167088f5acbb11d" }, "downloads": -1, "filename": "ratelim-0.1.6.tar.gz", "has_sig": false, "md5_digest": "91063fcac413e9faba01c9046c5134dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2793, "upload_time": "2015-02-27T18:06:08", "url": "https://files.pythonhosted.org/packages/c5/5a/e1440017bccb14523bb76356e6f3a5468386b8a9192bd901e98babd1a1ea/ratelim-0.1.6.tar.gz" } ] }