asgi-ratelimit:ASGI中间件以进行速率限制

时间:2021-05-01 02:00:10
【文件属性】:
文件名称:asgi-ratelimit:ASGI中间件以进行速率限制
文件大小:38KB
文件格式:ZIP
更新时间:2021-05-01 02:00:10
asgi asgi-middleware asgi-ratelimit Python ASGI RateLimit 限制用户访问频率。 基于ASGI。 100%覆盖率。 高性能。 支持常规匹配。 可定制的。 安装 # Only install pip install asgi-ratelimit # Use redis pip install asgi-ratelimit[redis] # Use jwt pip install asgi-ratelimit[jwt] # Install all pip install asgi-ratelimit[full] 用法 下面的示例将限制"default"组下的用户每秒最多访问一次/towns ,每分钟最多访问一次/forests 。 并且"admin"组中的用户没有限制。 from typing import Tuple from ratelimit import RateLimitMiddleware , Rule f
【文件预览】:
asgi-ratelimit-master
----.gitattributes(12B)
----ratelimit()
--------backends()
--------auths()
--------__init__.py(104B)
--------types.py(302B)
--------rule.py(948B)
--------core.py(3KB)
--------__version__.py(63B)
----.github()
--------workflows()
----poetry.lock(42KB)
----script()
--------upload.py(632B)
----LICENSE(11KB)
----README.md(6KB)
----tests()
--------test_core.py(3KB)
--------backends()
--------auths()
--------__init__.py(0B)
----.gitignore(1KB)
----pyproject.toml(1KB)

网友评论