{ "info": { "author": "Exahilosys", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "Installing\n==========\n\n.. code-block:: bash\n\n pip3 install throttle\n\nSimple Usage\n------------\n\n.. code-block:: python\n\n import time\n import throttle\n\n # limit to 3 calls\n # allow more every 1 second\n @throttle.wrap(1, 3)\n def aesthetic(*values):\n\n return ' '.join(values).upper()\n\n for index in range(10):\n\n result = aesthetic('beautiful')\n\n success = not result is throttle.fail\n\n print(index, success)\n\n time.sleep(0.23)\n\nComplex Usage\n-------------\n\n.. code-block:: python\n\n import time\n import random\n import throttle\n\n # allow more every 1 second\n delay = 1\n\n # limit to 3 calls\n limit = 3\n\n # only check values less than 5 against the limit\n key = lambda value: value < 5\n\n # or Static()\n valve = throttle.Valve()\n\n # make some quick calls\n for index in range(30):\n\n item = random.randrange(0, 8)\n\n allow = valve.check(delay, limit, item, key = key)\n\n print(item, allow)\n\n time.sleep(0.23)\n\nLinks\n-----\n\n- `Documentation `_\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Exahilosys/throttle", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "throttle", "package_url": "https://pypi.org/project/throttle/", "platform": "", "project_url": "https://pypi.org/project/throttle/", "project_urls": { "Homepage": "https://github.com/Exahilosys/throttle" }, "release_url": "https://pypi.org/project/throttle/0.2.2/", "requires_dist": [ "sphinx ; extra == 'docs'" ], "requires_python": "", "summary": "Frequency tracking and throttling utilities.", "version": "0.2.2", "yanked": false, "yanked_reason": null }, "last_serial": 6543350, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "cc649eba10667cb4321038eea3fe72f8", "sha256": "2f3101bd7fa4fb8ae3daa353c3541c4ef32de5c8aa01d262116f24de7fc0e27c" }, "downloads": -1, "filename": "throttle-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cc649eba10667cb4321038eea3fe72f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3479, "upload_time": "2019-10-24T08:00:30", "upload_time_iso_8601": "2019-10-24T08:00:30.604460Z", "url": "https://files.pythonhosted.org/packages/e4/5e/7bc6eb1ce87405d739b64992b98d889a98c78967c92037f56c5d39c2dfa0/throttle-0.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "52bc0a6646a466eb28086195c5d0c6c0", "sha256": "e3b3d30f6abd50217864b0ebb41d0548bf9a9dbb7fa78481ec56e541009aff7b" }, "downloads": -1, "filename": "throttle-0.0.0.tar.gz", "has_sig": false, "md5_digest": "52bc0a6646a466eb28086195c5d0c6c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2181, "upload_time": "2019-10-24T08:00:32", "upload_time_iso_8601": "2019-10-24T08:00:32.658792Z", "url": "https://files.pythonhosted.org/packages/19/56/3322cf628f2b873009d3f02da86ac0702848bc58d0ce39d875eccc705790/throttle-0.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e72f51459887246280ecd0214aba7eff", "sha256": "56b4c3d38fe9d143e2ea34c4ffea1754585ec5920a8dd10fb9ad07196cbb18a3" }, "downloads": -1, "filename": "throttle-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e72f51459887246280ecd0214aba7eff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4949, "upload_time": "2019-10-27T21:18:22", "upload_time_iso_8601": "2019-10-27T21:18:22.030731Z", "url": "https://files.pythonhosted.org/packages/29/ea/4428a2eb369f3ca05e2541fa266efd4f80dc89883b5d29cd8819738f0fda/throttle-0.2.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "458e88be42a3d2aa66475af9d75b322e", "sha256": "30aba2f0f801b6dddce9cab6e266f188b437c14644f361fc7cae2d211fca648e" }, "downloads": -1, "filename": "throttle-0.2.1.tar.gz", "has_sig": false, "md5_digest": "458e88be42a3d2aa66475af9d75b322e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3947, "upload_time": "2019-10-27T21:18:23", "upload_time_iso_8601": "2019-10-27T21:18:23.300016Z", "url": "https://files.pythonhosted.org/packages/c8/fe/a2964754d4bb74577269f54a305debf79cca90437ece9f4e9589e0d90f84/throttle-0.2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "87321a1cc4b2fd208168d852f7d558f9", "sha256": "a8bd279e062190708fc1df2bbf0aea5f8460bf7893114ebdb2789ce7a286e9fe" }, "downloads": -1, "filename": "throttle-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "87321a1cc4b2fd208168d852f7d558f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4955, "upload_time": "2020-01-30T13:08:04", "upload_time_iso_8601": "2020-01-30T13:08:04.744598Z", "url": "https://files.pythonhosted.org/packages/66/b7/52f82631b668ec9f0fe28322758d78e75334added5b012362393e5cb7849/throttle-0.2.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "17916282b566bde83d27f92b4bebef8b", "sha256": "5c949b0ae118c63e9e1be3e927d7ecdc9c46231248374d4d1cab95123e380e0c" }, "downloads": -1, "filename": "throttle-0.2.2.tar.gz", "has_sig": false, "md5_digest": "17916282b566bde83d27f92b4bebef8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4012, "upload_time": "2020-01-30T13:08:06", "upload_time_iso_8601": "2020-01-30T13:08:06.034796Z", "url": "https://files.pythonhosted.org/packages/93/5d/b2ccc39e665ee189eb465c1e637337150e72a65a160dbfcefd0b7b124e94/throttle-0.2.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87321a1cc4b2fd208168d852f7d558f9", "sha256": "a8bd279e062190708fc1df2bbf0aea5f8460bf7893114ebdb2789ce7a286e9fe" }, "downloads": -1, "filename": "throttle-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "87321a1cc4b2fd208168d852f7d558f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4955, "upload_time": "2020-01-30T13:08:04", "upload_time_iso_8601": "2020-01-30T13:08:04.744598Z", "url": "https://files.pythonhosted.org/packages/66/b7/52f82631b668ec9f0fe28322758d78e75334added5b012362393e5cb7849/throttle-0.2.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "17916282b566bde83d27f92b4bebef8b", "sha256": "5c949b0ae118c63e9e1be3e927d7ecdc9c46231248374d4d1cab95123e380e0c" }, "downloads": -1, "filename": "throttle-0.2.2.tar.gz", "has_sig": false, "md5_digest": "17916282b566bde83d27f92b4bebef8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4012, "upload_time": "2020-01-30T13:08:06", "upload_time_iso_8601": "2020-01-30T13:08:06.034796Z", "url": "https://files.pythonhosted.org/packages/93/5d/b2ccc39e665ee189eb465c1e637337150e72a65a160dbfcefd0b7b124e94/throttle-0.2.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }