aiohttp-limit-0.1.0
توضیحات
An aiohttp middleware for limiting connections
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | aiohttp-limit-0.1.0 |
| نام | aiohttp-limit |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Bence Nagy |
| ایمیل نویسنده | bence@underyx.me |
| آدرس صفحه اصلی | https://github.com/underyx/aiohttp-limit |
| آدرس اینترنتی | https://pypi.org/project/aiohttp-limit/ |
| مجوز | - |
#############
aiohttp-limit
#############
.. image:: https://circleci.com/gh/underyx/aiohttp-limit.svg?style=shield
:target: https://circleci.com/gh/underyx/aiohttp-limit
:alt: CI Status
An aiohttp_ middleware for limiting connections.
Python 3.5+ is required for usage, 3.7+ is required for tests.
*****
Usage
*****
Just add ``LimitMiddleware`` as a middleware:
.. code-block:: python
from aiohttp import web
from aiohttp_limit import LimitMiddleware
app = web.Application(middlewares=[LimitMiddleware(requests=10)])
This sample usage will restrict requests to 10 per worker.
.. _aiohttp: http://aiohttp.readthedocs.io/en/stable/
نحوه نصب
نصب پکیج whl aiohttp-limit-0.1.0:
pip install aiohttp-limit-0.1.0.whl
نصب پکیج tar.gz aiohttp-limit-0.1.0:
pip install aiohttp-limit-0.1.0.tar.gz