Install & Compatibility
Where this runs
tested against v0.3.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.1s · import 0.000s · 30MB
27MB installed
● package 27MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
enable_zlib_ng
✓ from aiohttp_zlib_ng import enable_zlib_ng
✗ from aiohttp_zlib_ng import install_zlib_ng
disable_zlib_ng
✓ from aiohttp_zlib_ng import disable_zlib_ng
best_zlib
✓ from aiohttp_zlib_ng import best_zlib
Import and call install_zlib_ng() to enable zlib_ng support in aiohttp. Ensure aiohttp is installed.
import aiohttp
from aiohttp_zlib_ng import install_zlib_ng
install_zlib_ng()
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('https://httpbin.org/get') as resp:
print(resp.status)
Upgrade
Version history
0.3.2latest on PyPI · released Jun 24, 2024
Audit
Dependencies
aiohttprequiredaiohttp-zlib-ng is a monkey-patch for aiohttp's compression
isaloptionaloptional extra for even faster compression (install aiohttp-zlib-ng[isal])