{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "falcon-ratelimit\r\n\r\n========\r\n\r\n\r\n\r\n\r\n\r\nRate limiter for Falcon. Install with:\r\n\r\n```bash\r\n\r\npip install falcon-ratelimit\r\n\r\n```\r\n\r\n\r\n\r\nUse like:\r\n\r\n\r\n\r\n```python\r\n\r\nimport falcon\r\n\r\nfrom falconratelimit import rate_limit\r\n\r\n\r\n\r\n\r\n\r\nclass NoRedisResource(object):\r\n\r\n @falcon.before(rate_limit(per_second=5, window_size=30, resource='resource_name'))\r\n\r\n def on_post(self, req, resp):\r\n\r\n ...\r\n\r\n\r\n\r\nclass RedisResource(object):\r\n\r\n @falcon.before(rate_limit(redis_url='localhost:6379', per_second=1, window_size=10))\r\n\r\n def on_post(self, req, resp):\r\n\r\n ...\r\n\r\n```\r\n\r\n\r\n\r\nThis package works by limiting the number of requests using two variables `per_second` and `window_size`. In the first\r\n\r\nexample above, the `NoRedisResource` class is restricted to 5 requests per second over a 30 second window meaning that\r\n\r\nthere is a limit of 150 requests over 30 seconds. The default storage of calling the `rate_limit` decorator is an in\r\n\r\nmemory list to store the number of requests for the given user using the resource `resource_name`.\r\n\r\n\r\n\r\nThe second example implements the optional storage to use Redis by passing in a `redis_url` to store user request data.\r\n\r\nUsing Redis allows for the rate limiting to be implemented across multiple instances of a particular application. In\r\n\r\nthe `RedisResource` class example the user is allowed to make 1 request per second over 10 seconds meaning that there\r\n\r\nis a limit of 10 requests over 10 seconds. Since this example didn't pass in a `resource` it uses `default` as the name\r\n\r\nfor request storage.\r\n\r\n\r\n\r\nIf you do not have the `redis` package installed, Redis-related functionality will not work.\r\n\r\n\r\n\r\n\r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "falcon-ratelimit", "package_url": "https://pypi.org/project/falcon-ratelimit/", "platform": "", "project_url": "https://pypi.org/project/falcon-ratelimit/", "project_urls": null, "release_url": "https://pypi.org/project/falcon-ratelimit/1.1/", "requires_dist": [ "falcon", "six" ], "requires_python": "", "summary": "A rate limiter plugin for Falcon", "version": "1.1" }, "last_serial": 4503679, "releases": { "0.1b1": [ { "comment_text": "", "digests": { "md5": "8cfb8db73f47fd09fac7c0942fea896a", "sha256": "e4b0761a4d4aff46fcd28935b4e60da3800831df633b00e9d1318a2462bf9b58" }, "downloads": -1, "filename": "falcon_ratelimit-0.1b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8cfb8db73f47fd09fac7c0942fea896a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3326, "upload_time": "2017-10-12T08:16:16", "url": "https://files.pythonhosted.org/packages/e0/64/93733c960dc93bfe1b23ba6e06d1c9dc280bdc8227b1d1781b5d30058ef4/falcon_ratelimit-0.1b1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a607525c2789fc271a8a09621afcf52", "sha256": "64d82fedebeb822f4793ef0cf1aaab99b557e6160c162e63d24ed0b6fa7a974f" }, "downloads": -1, "filename": "falcon-ratelimit-0.1b1.win32.zip", "has_sig": false, "md5_digest": "5a607525c2789fc271a8a09621afcf52", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4326, "upload_time": "2017-10-12T08:16:18", "url": "https://files.pythonhosted.org/packages/82/c5/a9d41f5c5cc9b293be126a557d80c8bbf0ef41b8bbf7fd0d6e3103500701/falcon-ratelimit-0.1b1.win32.zip" } ], "0.1b3": [ { "comment_text": "", "digests": { "md5": "08bfe137397d4cba876a47461b085573", "sha256": "99f617d90a127054114f9c175063a82711dbb74c2a4a8d63c8c39f8d7e877394" }, "downloads": -1, "filename": "falcon_ratelimit-0.1b3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "08bfe137397d4cba876a47461b085573", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3359, "upload_time": "2017-10-12T08:27:03", "url": "https://files.pythonhosted.org/packages/06/3e/943b938f0400762dcdf4ccb837ec77ddeee336a1e439ced1cca4a8505b51/falcon_ratelimit-0.1b3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dc590461efc9bed4da9389a54b20b346", "sha256": "a3d983d93b07fd2a95b4f28613dc2a372be506b77512808505af20a1b5b76c03" }, "downloads": -1, "filename": "falcon-ratelimit-0.1b3.win32.zip", "has_sig": false, "md5_digest": "dc590461efc9bed4da9389a54b20b346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4368, "upload_time": "2017-10-12T08:27:04", "url": "https://files.pythonhosted.org/packages/fd/e3/65180f2b6e5e6866c135e1d72a3db15d407df33b6461af42da2627524c6d/falcon-ratelimit-0.1b3.win32.zip" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "3006adf5a5a2a8d410803ba046d79803", "sha256": "bf2148ddc82623fc2514e9c30e88777e335f33faa6e8bfacc69bd8ba62111db4" }, "downloads": -1, "filename": "falcon_ratelimit-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3006adf5a5a2a8d410803ba046d79803", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4065, "upload_time": "2018-11-19T16:22:30", "url": "https://files.pythonhosted.org/packages/51/c0/0ae7776eef9a150f9bcd83af47e479a6fa13d6f9f5cc53061bd5a9e22719/falcon_ratelimit-1.0-py2.py3-none-any.whl" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "79e2a6ad8ea18008a56cccddd18088c9", "sha256": "6ba8d51ba380c688d8bbc8404818e8d45ceb5d34c110e69ee07ddfca88c5c71e" }, "downloads": -1, "filename": "falcon_ratelimit-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79e2a6ad8ea18008a56cccddd18088c9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4057, "upload_time": "2018-11-19T16:50:27", "url": "https://files.pythonhosted.org/packages/0b/36/46c15a7709f7550d8d205445a6e3b77a7ff897627c73a86d85f92c47ea5e/falcon_ratelimit-1.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79e2a6ad8ea18008a56cccddd18088c9", "sha256": "6ba8d51ba380c688d8bbc8404818e8d45ceb5d34c110e69ee07ddfca88c5c71e" }, "downloads": -1, "filename": "falcon_ratelimit-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79e2a6ad8ea18008a56cccddd18088c9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4057, "upload_time": "2018-11-19T16:50:27", "url": "https://files.pythonhosted.org/packages/0b/36/46c15a7709f7550d8d205445a6e3b77a7ff897627c73a86d85f92c47ea5e/falcon_ratelimit-1.1-py2.py3-none-any.whl" } ] }