aiohttp-compress-0.2.1
توضیحات
This module is the simplest way to enable compression support for aiohttp server applications globally.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | POSIX |
| نام فایل | aiohttp-compress-0.2.1 |
| نام | aiohttp-compress |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dmitry Orlov <me@mosquito.su> |
| ایمیل نویسنده | me@mosquito.su |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/aiohttp-compress/ |
| مجوز | Apache Software License |
aiohttp-compress
================
[](https://pypi.org/project/aiohttp-compress) [](https://pypi.org/project/aiohttp-compress) [](https://pypi.org/project/aiohttp-compress) [](https://pypi.org/project/aiohttp-compress) [](https://coveralls.io/github/mosquito/aiohttp-compress?branch=master) 
This module is the simplest way to enable compression support for `aiohttp` server applications globally.
Installation
------------
```bash
pip install aiohttp-compress
```
Example
-------
```python
from aiohttp import web
from aiohttp_compress import compress_middleware
async def handle(request):
name = request.match_info.get(
'name', "Anonymous"
)
text = "Hello, " + name
return web.Response(text=text)
app = web.Application()
app.middlewares.append(compress_middleware)
app.add_routes([
web.get('/', handle),
web.get('/{name}', handle)
])
if __name__ == '__main__':
web.run_app(app)
```
نیازمندی
| مقدار | نام |
|---|---|
| <4 | aiohttp |
| !=4.3 | coverage |
| - | coveralls |
| - | pylava |
| - | pytest |
| - | pytest-aiohttp |
| - | pytest-cov |
| >=2.4 | tox |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >3.6.*, <4 | Python |
نحوه نصب
نصب پکیج whl aiohttp-compress-0.2.1:
pip install aiohttp-compress-0.2.1.whl
نصب پکیج tar.gz aiohttp-compress-0.2.1:
pip install aiohttp-compress-0.2.1.tar.gz