skillfed

aiohttp-fast-zlib

Use the fastest installed zlib compatible library with aiohttp

aiohttp-fast-zlib v0.3.0 1.8M downloads/30d#3,529 on PyPI4
Permissive license Apache-2.0 Active released

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-zlib

uv

uv add aiohttp-fast-zlib

poetry

poetry add aiohttp-fast-zlib

Installing 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

aiohttp compression performancezlib optimization aiohttpfast compression websocketsisal zlib-ng wrapperhttp compression speedupaiohttp deflate faster
compression-optimizationwebsocket-performance

More Libraries packages