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)

Metadata

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 Provenance Actions
aiohttp-compress-0.2.1.tar.gz 3.0 kB Without provenance Details for aiohttp-compress-0.2.1.tar.gz

Built distribution (wheel)

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

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

Security for aiohttp-compress 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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