--- id: hpack version: "4.2.0" license: MIT license_treatment: permissive maintenance: active --- # hpack — Pure-Python HPACK header encoding License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install hpack uv add hpack poetry add hpack ## Description ======================================== 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'),... ## AI interpretation — verify before relying hpack provides pure-Python HTTP/2 header encoding and decoding using the HPACK compression algorithm, enabling Python programs to implement HTTP/2 protocol support. 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. [View on SkillFed](https://skillfed.io/packages/hpack) · [View on PyPI](https://pypi.org/project/hpack/)