Skip to main content

hpack: HTTP/2 Header Encoding for Python

https://raw.github.com/Lukasa/hyper/development/docs/source/images/hyper.png https://travis-ci.org/Lukasa/hpack.png?branch=master

This module contains a pure-Python HTTP/2 header encoding (HPACK) logic for use in Python programs that implement HTTP/2. It also contains a compatibility layer that automatically enables the use of nghttp2 if it’s available.

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.

Authors

hpack is maintained by Cory Benfield, with contributions from others. For more details about the contributors, please see CONTRIBUTORS.rst.

Release History

2.1.0 (2016-02-02)

API Changes (Backward Compatible)

  • Added new InvalidTableIndex exception, a subclass of HPACKDecodingError.

  • Instead of throwing IndexError when encountering invalid encoded integers HPACK now throws HPACKDecodingError.

  • Instead of throwing UnicodeDecodeError when encountering headers that are not UTF-8 encoded, HPACK now throws HPACKDecodingError.

  • Instead of throwing IndexError when encountering invalid table offsets, HPACK now throws InvalidTableIndex.

  • Added raw flag to decode, allowing decode to return bytes instead of attempting to decode the headers as UTF-8.

Bugfixes

  • memoryview objects are now used when decoding HPACK, improving the performance by avoiding unnecessary data copies.

2.0.1 (2015-11-09)

  • Fixed a bug where the Python HPACK implementation would only emit header table size changes for the total change between one header block and another, rather than for the entire sequence of changes.

2.0.0 (2015-10-12)

  • Remove unused HPACKEncodingError.

  • Add the shortcut ability to import the public API (Encoder, Decoder, HPACKError, HPACKDecodingError) directly, rather than from hpack.hpack.

1.1.0 (2015-07-07)

  • Add support for emitting ‘never indexed’ header fields, by using an optional third element in the header tuple. With thanks to @jimcarreer!

1.0.1 (2015-04-19)

  • Header fields that have names matching header table entries are now added to the header table. This improves compression efficiency at the cost of slightly more table operations. With thanks to Tatsuhiro Tsujikawa.

1.0.0 (2015-04-13)

  • Initial fork of the code from hyper.

Release files for hpack 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hpack 2.1.0
File Size Uploaded
hpack-2.1.0.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hpack 2.1.0
File Interpreter ABI Platform
hpack-2.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 37.0 kB

Release files / hpack-2.1.0.tar.gz

Download URL hpack-2.1.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
535e0628e7b44f6eb76d2acf908b6537c6819f6aad400bcaebb8bde161de7cd9
BLAKE2b-256 checksum
How to use checksums
f6e84213dc75393389d13f18bbef82873a8ac4a879544abe6b5067662f8fb3fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / hpack-2.1.0-py2.py3-none-any.whl

Download URL hpack-2.1.0-py2.py3-none-any.whl
Size 16.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
994e76b3394c6ebf97d386a5256eeed9deca7c32f4bbe5aaf858480f5e735a34
BLAKE2b-256 checksum
How to use checksums
3340ed725f55433ae7ae8af664ef3936dfb209816d6fac4873175957fa45f050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.0.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

This release

2.1.0 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page