Skip to main content

aiohttp-compress

PyPI - License Wheel PyPI PyPI Coverage Status tox

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)

Release files for aiohttp-compress 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiohttp-compress 0.2.1
File Size Uploaded
aiohttp-compress-0.2.1.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiohttp-compress 0.2.1
File Interpreter ABI Platform
aiohttp_compress-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / aiohttp-compress-0.2.1.tar.gz

Download URL aiohttp-compress-0.2.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
915a66e06d142a465850686afce6c282f351ce732744a60131550b4b5d2b6851
BLAKE2b-256 checksum
How to use checksums
4f42b8a4d96e281c78d8b911358be850ff785115f565c6233469cb921b314f85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Release files / aiohttp_compress-0.2.1-py3-none-any.whl

Download URL aiohttp_compress-0.2.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19008a2a960499c3f209756d5bcd788868dc411d6c491fd1f63a0d18c916a4f8
BLAKE2b-256 checksum
How to use checksums
5e376c6396de6ca74135f6ec17c52f37bc4912593bed60df075e7f3af7faea15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page