aiohttp-compress 0.2.1

Creator: bigcodingguy24

Last updated:

0 purchases

aiohttp-compress 0.2.1 Image
aiohttp-compress 0.2.1 Images

Languages

Categories

Add to Cart

Description:

aiohttpcompress 0.2.1

aiohttp-compress

This module is the simplest way to enable compression support for aiohttp server applications globally.
Installation
pip install aiohttp-compress

Example
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)

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.