aiohttp-fast-zlib
Use the fastest installed zlib compatible library with aiohttp
What it is and what it does
aiohttp-fast-zlib is a thin wrapper that swaps aiohttp's compression layer to use faster zlib-compatible libraries. Compression is a known bottleneck in aiohttp, especially for WebSocket connections that compress frequently; this package patches aiohttp to use isal or zlib-ng instead of the standard library's zlib, both of which are drop-in replacements with better performance. You call a single enable() function at startup, and all subsequent aiohttp compression operations use the faster library.
The package is in Pre-Alpha development, meaning the API and behavior may change. It has a single runtime dependency on aiohttp and requires Python 3.9 or later. Installation is straightforward, but you must also install one of the optional compression libraries (isal or zlib-ng) to see any benefit.
Use it for:
- Speed up WebSocket communication in aiohttp applications by reducing compression CPU overhead.
- Improve throughput for HTTP APIs that heavily compress responses (JSON, HTML, etc.).
- Reduce latency in real-time aiohttp services where zlib compression is a measurable bottleneck.
- Optimize resource usage on servers handling many concurrent aiohttp connections.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Replaces aiohttp's default zlib compression with faster alternatives (isal or zlib-ng) to reduce compression bottlenecks in HTTP and WebSocket connections.
Yes, if you use aiohttp and compression is a known bottleneck in your workload. The package is low-friction to install and maintain, has no known vulnerabilities, and offers a straightforward performance win. Pre-Alpha status means you should test it in a non-critical environment first and monitor for API changes in future releases.
Install
aiohttp-fast-zlib on PyPI
pip
pip install aiohttp-fast-zlibuv
uv add aiohttp-fast-zlibpoetry
poetry add aiohttp-fast-zlibInstalling aiohttp-fast-zlib
Before you install
Low friction: pure Python wheel with a single runtime dependency (aiohttp). Actively maintained with recent commits. Pre-Alpha status signals the package is still stabilizing, so expect potential API changes.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain license notices in distributions.
Quickstart
pip install aiohttp-fast-zlib[isal]
import aiohttp_fast_zlib
aiohttp_fast_zlib.enable()
Requires either isal or zlib-ng to be installed as an optional extra; without one, the package will not provide a performance benefit.
Verify before relying
- Whether isal or zlib-ng must be pre-installed or are automatically pulled in by the extras.
- Specific performance gains (percentage improvement) over standard aiohttp compression.
- Compatibility with all aiohttp versions or specific version constraints.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — aiohttp |
| Maintenance | actively maintained — 433 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,811,781/month — #3,529 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiohttp_fast_zlib-0.3.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
aiohttp-fast-url-dispatcherReplaces aiohttp's default URL dispatcher with…
permissive · top 15,000 on PyPI
aiohttp-zlib-ngReplaces aiohttp's default zlib compression…
permissive · top 15,000 on PyPI
zlib-ngProvides faster zlib and gzip compression and…
permissive · top 5,000 on PyPI
isalProvides Python bindings for Intel's ISA-L…
permissive · top 5,000 on PyPI
aiofastnetaiofastnet replaces asyncio's transport and…
unclear · top 15,000 on PyPI
aioshellyAsynchronous Python library for controlling…
permissive · top 15,000 on PyPI
aioouiPerforms asynchronous lookups of…
permissive · top 15,000 on PyPI
aiohttp-wsgiRuns WSGI applications like Django and Flask on…
permissive · top 15,000 on PyPI
bloscPython wrapper for the Blosc compression…
permissive · top 15,000 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI