Pure-Python HPACK header encoding
Project Links
Meta
Author: Cory Benfield
Maintainer: Thomas Kriechbaumer
Requires Python: >=3.9
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Programming Language
- Python
- Python :: 3 :: Only
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
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:
from hpack import Encoder, Decoder
headers = [
(':method', 'GET'),
(':path', '/jimiscool/'),
('X-Some-Header', 'some_value'),
]
e = Encoder()
encoded_bytes = e.encode(headers)
d = Decoder()
decoded_headers = d.decode(encoded_bytes)
Contributing
hpack welcomes contributions from anyone! Unlike many other projects we are happy to accept cosmetic contributions and small contributions, in addition to large feature requests and changes.
Before you contribute (either by opening an issue or filing a pull request), please read the contribution guidelines.
License
hpack is made available under the MIT License. For more details, see the LICENSE file in the repository.
4.1.0
Jan 22, 2025
4.0.0
Aug 30, 2020
3.0.0
Mar 29, 2017
2.3.0
Aug 04, 2016
2.2.0
Apr 20, 2016
2.1.1
Mar 16, 2016
2.1.0
Feb 02, 2016
2.0.1
Nov 09, 2015
2.0.0
Oct 12, 2015
1.1.0
Jul 07, 2015
1.0.1
Apr 19, 2015
1.0.0
Apr 13, 2015
Wheel compatibility matrix
Files in release
No dependencies