{ "info": { "author": "Roman Tomjak", "author_email": "r.tomjaks@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# redis-ratelimit\n\n![Travis](https://img.shields.io/travis/romantomjak/redis-ratelimit.svg)\n![Coveralls](https://img.shields.io/coveralls/github/romantomjak/redis-ratelimit.svg)\n![PyPI](https://img.shields.io/pypi/v/redis-ratelimit.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/redis-ratelimit.svg)\n\nA fixed window rate limiter based on Redis\n\n---\n\n## Installation\n\n```shell\n$ pip install redis-ratelimit\n```\n\n## Example Usage\n\nThe library itself is framework agnostic, but let's assume you want to use it with [Flask](http://flask.pocoo.org/docs/0.12/):\n\n```python\nfrom flask import Flask, jsonify\nfrom redis_ratelimit import ratelimit\n\napp = Flask(__name__)\n\n@app.route('/')\n@ratelimit(rate='10/m', key='ccc')\n@ratelimit(rate='2/s', key='ccc')\ndef index():\n return jsonify({'status': 'OK'})\n```\n\nThis will allow a total of 10 requests in any given minute, but no faster than 2 requests a second.\n\n## Notes\n\n- [Redis Rate Limiting Pattern #2](https://redis.io/commands/INCR#pattern-rate-limiter-2)\n\n## License\n\nMIT\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/romantomjak/redis-ratelimit", "keywords": "redis rate-limit rate-limiter ratelimit ratelimiter", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "redis-ratelimit", "package_url": "https://pypi.org/project/redis-ratelimit/", "platform": "", "project_url": "https://pypi.org/project/redis-ratelimit/", "project_urls": { "Homepage": "https://github.com/romantomjak/redis-ratelimit" }, "release_url": "https://pypi.org/project/redis-ratelimit/1.0.3/", "requires_dist": [ "redis" ], "requires_python": "", "summary": "A fixed window rate limiter based on Redis", "version": "1.0.3" }, "last_serial": 3955596, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "bd6164ca43d6deb1c8d154e32f3cfa3c", "sha256": "3afe5f8ebdb162b856da86c07356b243f561e29c00a761bfe0f0ffdc77ae677f" }, "downloads": -1, "filename": "redis_ratelimit-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bd6164ca43d6deb1c8d154e32f3cfa3c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4905, "upload_time": "2018-03-20T23:41:39", "url": "https://files.pythonhosted.org/packages/f7/57/fef0e7435de4082698778a67cd29b08214746c1d09274e0f45dc660deb60/redis_ratelimit-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7bec3ecb86a8b06384297bc5ecb4d8d9", "sha256": "d9bc87ceeb5097b510c2b5b2c3084ecf83146c72ad0f1e1fab83098aee2d25c9" }, "downloads": -1, "filename": "redis-ratelimit-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7bec3ecb86a8b06384297bc5ecb4d8d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2813, "upload_time": "2018-03-20T23:41:41", "url": "https://files.pythonhosted.org/packages/b4/6b/60fe2b85a6ea56787692937224a3fffc72f8c6d3f624eb67810e70b0e1b7/redis-ratelimit-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "0573994d50d5e55823f6d0eeb86b92d3", "sha256": "84e90bdd080b0b3a2885509524733895e4d036daebbed016f77ea029d1bdd888" }, "downloads": -1, "filename": "redis_ratelimit-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0573994d50d5e55823f6d0eeb86b92d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4910, "upload_time": "2018-03-20T23:58:47", "url": "https://files.pythonhosted.org/packages/22/6c/33709ac38b289b621196a9f35b04085c904bfe3fdd52e9bb964344a395fd/redis_ratelimit-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b5d18a77ca81b06a3a66a2ddb76a679", "sha256": "49b9904aa8f04fbf8deb6da0c88be040254e9047ea2a12f5e4d2f787ed2fd8e1" }, "downloads": -1, "filename": "redis-ratelimit-1.0.1.tar.gz", "has_sig": false, "md5_digest": "3b5d18a77ca81b06a3a66a2ddb76a679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2829, "upload_time": "2018-03-20T23:58:49", "url": "https://files.pythonhosted.org/packages/2b/7f/06773aa6ea5ca0f11c6e679a1f89b1b4e8943225cc917dc4dfd576c8f579/redis-ratelimit-1.0.1.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "229b0bbc634f2434bfacda6eb11c8ad3", "sha256": "db0fb15c8e1170d03255b4776de8c4adfbb39bd7d8f96712cee0076e52dfbceb" }, "downloads": -1, "filename": "redis_ratelimit-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "229b0bbc634f2434bfacda6eb11c8ad3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3511, "upload_time": "2018-06-12T22:14:38", "url": "https://files.pythonhosted.org/packages/4f/6a/b3e918eb9e39f473aaa45c7beb59d99a68be4911cdf065e6446512121ba5/redis_ratelimit-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cca6fb8bb5c451ec22953cbbf76d035f", "sha256": "088edb6ad0380e0c485f773d1831aaccfff2d8dc56bb63a3cabf97969f37ebb1" }, "downloads": -1, "filename": "redis-ratelimit-1.0.3.tar.gz", "has_sig": false, "md5_digest": "cca6fb8bb5c451ec22953cbbf76d035f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3011, "upload_time": "2018-06-12T22:14:39", "url": "https://files.pythonhosted.org/packages/f6/0d/922b759b80a16ece58619e4d0c605c7351f2ffe7c37e1692178929678ebe/redis-ratelimit-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "229b0bbc634f2434bfacda6eb11c8ad3", "sha256": "db0fb15c8e1170d03255b4776de8c4adfbb39bd7d8f96712cee0076e52dfbceb" }, "downloads": -1, "filename": "redis_ratelimit-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "229b0bbc634f2434bfacda6eb11c8ad3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3511, "upload_time": "2018-06-12T22:14:38", "url": "https://files.pythonhosted.org/packages/4f/6a/b3e918eb9e39f473aaa45c7beb59d99a68be4911cdf065e6446512121ba5/redis_ratelimit-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cca6fb8bb5c451ec22953cbbf76d035f", "sha256": "088edb6ad0380e0c485f773d1831aaccfff2d8dc56bb63a3cabf97969f37ebb1" }, "downloads": -1, "filename": "redis-ratelimit-1.0.3.tar.gz", "has_sig": false, "md5_digest": "cca6fb8bb5c451ec22953cbbf76d035f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3011, "upload_time": "2018-06-12T22:14:39", "url": "https://files.pythonhosted.org/packages/f6/0d/922b759b80a16ece58619e4d0c605c7351f2ffe7c37e1692178929678ebe/redis-ratelimit-1.0.3.tar.gz" } ] }