hpack
Pure-Python HPACK header encoding
Install
hpack on PyPI
pip
pip install hpackuv
uv add hpackpoetry
poetry add hpackPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 51 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: hpack-4.2.0-py3-none-any.whl
About hpack
from the package's own PyPI description — quoted content, verbatim
======================================== hpack: HTTP/2 Header Encoding for Python ========================================
.. image:: https://github.com/python-hyper/hpack/workflows/CI/badge.svg :target: https://github.com/python-hyper/hpack/actions :alt: Build Status .. image:: https://codecov.io/gh/python-hyper/hpack/branch/master/graph/badge.svg :target: https://codecov.io/gh/python-hyper/hpack :alt: Code Coverage .. image:: https://readthedocs.org/projects/hpack/badge/?version=latest :target: https://hpack.readthedocs.io/en/latest/ :alt: Documentation Status .. image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg :target: https://gitter.im/python-hyper/community :alt: Chat community
.. image:: https://raw.github.com/python-hyper/documentation/master/source/logo/hyper-black-bg-white.png
This module contains a pure-Python HTTP/2 header encoding (HPACK) logic for use in Python programs that implement HTTP/2.
Documentation
Documentation is available at https://hpack.readthedocs.io .
Quickstart:
.. code-block:: python
from hpack import Encoder, Decoder
headers = [
(':method', 'GET'),...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
hpack provides pure-Python HTTP/2 header encoding and decoding using the HPACK compression algorithm, enabling Python programs to implement HTTP/2 protocol support.
Installation is straightforward with no runtime dependencies and a pure-Python wheel distribution. The package is actively maintained with a recent release (51 days old) and an active repository.
hpack is released under the MIT License, a permissive license that allows use in both open-source and proprietary projects with minimal restrictions.
Usage
from hpack import Encoder, Decoder
headers = [(':method', 'GET'), (':path', '/'), ('X-Header', 'value')]
e = Encoder()
encoded = e.encode(headers)
d = Decoder()
decoded = d.decode(encoded)
Requires Python 3.10 or later.
Verdict: hpack is a stable, actively maintained library for HTTP/2 header compression with zero dependencies, permissive licensing, and broad Python 3.10+ support. No known vulnerabilities and top-1000 popularity make it a reliable choice for HTTP/2 implementations.
Similar packages
permissive · top 1,000 on PyPI
simplejsonpermissive · top 1,000 on PyPI
brotlipermissive · top 1,000 on PyPI
h2permissive · top 1,000 on PyPI
wsprotopermissive · top 1,000 on PyPI
kafka-pythonpermissive · top 1,000 on PyPI
ujsonpermissive · top 1,000 on PyPI
h11permissive · top 100 on PyPI
zstandardpermissive · top 1,000 on PyPI
hyperlinkpermissive · top 1,000 on PyPI