{ "info": { "author": "Max Dymond", "author_email": "cmeister2@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# requests-ratelimit-adapter\n\n[![pypi version](https://img.shields.io/pypi/v/requests_ratelimit_adapter.svg)](https://pypi.python.org/pypi/requests_ratelimit_adapter)\n[![Travis Status](https://img.shields.io/travis/cmeister2/requests_ratelimit_adapter.svg)](https://travis-ci.org/cmeister2/requests_ratelimit_adapter)\n[![Documentation Status](https://readthedocs.org/projects/requests-ratelimit-adapter/badge/?version=latest)](https://requests-ratelimit-adapter.readthedocs.io/en/latest/?badge=latest)\n\nA ratelimiting Session adapter for requests.\n\n- Free software: MIT license\n- Documentation: https://requests-ratelimit-adapter.readthedocs.io.\n\n## Example\n\n >>> from requests_ratelimit_adapter import HTTPRateLimitAdapter\n >>> import requests\n >>> import time\n\n >>> # Create a rate limiting adapter\n >>> rate_limiter = HTTPRateLimitAdapter(calls=1, period=1)\n\n >>> s = requests.Session()\n >>> s.mount(\"https://\", rate_limiter)\n\n >>> # This first request will start the period.\n >>> r = s.get(\"https://httpbin.org/get\")\n >>> r.raise_for_status()\n >>> time1 = time.time()\n\n >>> # This second request will wait 1 second before executing.\n >>> r2 = s.get(\"https://httpbin.org/get\")\n >>> r2.raise_for_status()\n >>> time2 = time.time()\n\n >>> # For this example, verify the timestamps are more than a second apart.\n >>> assert time2 >= time1 + 1\n\n\n## Credits\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [cmeister2/cookiecutter-pypackage](https://github.com/cmeister2/cookiecutter-pypackage) project template.\n\n\n# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n### Changed\n\n## [0.2.0] - 2019-01-06\n### Added\n- Wrap the HTTPAdapter code from `requests` so there's less boilerplate.\n\n## [0.1.2] - 2018-12-24\n### Changed\n- Use the *correct* travis password for deploying to PyPI.\n\n## [0.1.1] - 2018-12-24\n### Added\n- Add travis password for deploying to PyPI.\n\n## [0.1.0] - 2018-12-24\n### Added\n- Initial commit of code.\n\n[Unreleased]: https://github.com/cmeister2/requests_ratelimit_adapter/compare/v0.1.2...HEAD\n[0.2.0]: https://github.com/cmeister2/requests_ratelimit_adapter/compare/v0.1.2...v0.2.0\n[0.1.2]: https://github.com/cmeister2/requests_ratelimit_adapter/compare/v0.1.1...v0.1.2\n[0.1.1]: https://github.com/cmeister2/requests_ratelimit_adapter/compare/v0.1.0...v0.1.1\n[0.1.0]: https://github.com/cmeister2/requests_ratelimit_adapter/tree/v0.1.0\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://github.com/cmeister2/requests_ratelimit_adapter", "keywords": "requests_ratelimit_adapter", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "requests-ratelimit-adapter", "package_url": "https://pypi.org/project/requests-ratelimit-adapter/", "platform": "", "project_url": "https://pypi.org/project/requests-ratelimit-adapter/", "project_urls": { "Homepage": "https://github.com/cmeister2/requests_ratelimit_adapter" }, "release_url": "https://pypi.org/project/requests-ratelimit-adapter/0.2.0/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A ratelimiting Session adapter for requests.", "version": "0.2.0" }, "last_serial": 4666705, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "429b4d63b331d4604134ff66d3dc4878", "sha256": "caba0661588db6e6198ed96c701b07714d52a3d9c12d8978164a7d9e02c80b9b" }, "downloads": -1, "filename": "requests_ratelimit_adapter-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "429b4d63b331d4604134ff66d3dc4878", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5764, "upload_time": "2018-12-24T00:58:35", "url": "https://files.pythonhosted.org/packages/82/23/5901bb20bdc02d922a34584f236f3d3efe45d751ecaee10ffaa3dffcdcf0/requests_ratelimit_adapter-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7047208f571e869c9bb9a644d09e7702", "sha256": "16c666c94f2072b73b1c239b4d1b51b49de3315cf25799ed47bbd2f957ffada0" }, "downloads": -1, "filename": "requests_ratelimit_adapter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7047208f571e869c9bb9a644d09e7702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10408, "upload_time": "2018-12-24T00:58:37", "url": "https://files.pythonhosted.org/packages/9a/a5/5d71614994162e18b4c85868050171190a0bad6020a974176df98220cf63/requests_ratelimit_adapter-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "bfa0b2ca47d3ccff9e77de95ac3648da", "sha256": "e21792f57c3e9ddb10d5d4cb9c85585cb76164ea21b2cadfa2741f4cdeff5aa5" }, "downloads": -1, "filename": "requests_ratelimit_adapter-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bfa0b2ca47d3ccff9e77de95ac3648da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5886, "upload_time": "2019-01-06T22:20:59", "url": "https://files.pythonhosted.org/packages/e5/7f/c59b619b0564b410e4048167fa1dca34c1470e092170f909abe944e56a7b/requests_ratelimit_adapter-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af4c432cecfab1fecd23e8079218d72f", "sha256": "d4400321266002916646da0b64b1a89eedc4a0bf2e42e8834b1245e6ed081095" }, "downloads": -1, "filename": "requests_ratelimit_adapter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "af4c432cecfab1fecd23e8079218d72f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10601, "upload_time": "2019-01-06T22:21:02", "url": "https://files.pythonhosted.org/packages/15/32/e95f370e1921af9406960a273bbc848590ef953f833c61d0bc9d03657fae/requests_ratelimit_adapter-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bfa0b2ca47d3ccff9e77de95ac3648da", "sha256": "e21792f57c3e9ddb10d5d4cb9c85585cb76164ea21b2cadfa2741f4cdeff5aa5" }, "downloads": -1, "filename": "requests_ratelimit_adapter-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bfa0b2ca47d3ccff9e77de95ac3648da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5886, "upload_time": "2019-01-06T22:20:59", "url": "https://files.pythonhosted.org/packages/e5/7f/c59b619b0564b410e4048167fa1dca34c1470e092170f909abe944e56a7b/requests_ratelimit_adapter-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af4c432cecfab1fecd23e8079218d72f", "sha256": "d4400321266002916646da0b64b1a89eedc4a0bf2e42e8834b1245e6ed081095" }, "downloads": -1, "filename": "requests_ratelimit_adapter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "af4c432cecfab1fecd23e8079218d72f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10601, "upload_time": "2019-01-06T22:21:02", "url": "https://files.pythonhosted.org/packages/15/32/e95f370e1921af9406960a273bbc848590ef953f833c61d0bc9d03657fae/requests_ratelimit_adapter-0.2.0.tar.gz" } ] }