Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python HPACK library using nahpack

Project Description

nahpackpy is an HTTP/2 RFC 7541 HPACK library. It wraps the Rust nahpack library.


>>> from nahpackpy import Decoder
>>> decoder = Decoder()
>>> headers = decoder.decode_block(
>>> for header in headers:
Header(name=b':method', value=b'GET')
Header(name=b':scheme', value=b'http')
Header(name=b':path', value=b'/')
Header(name=b':authority', value=b'')
>>> from nahpackpy import Encoder
>>> encoder = Encoder()
>>> encoder.encode_block((
        (b':method', b'GET'),
        (b':scheme', b'http'),
        (b':path', b'/'),
        (b':authority', b''),


Installation from source requires the use of the Rust language for compilation of extensions. The “Nightly” channel of rust is required. Download a package from

You can then create a wheel, which will contain the compiled shared library, by running make. Or, run python install to install in your current environment.


nahpackpy is licensed under the Mozilla Public License, Version 2.0.

Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nahpackpy-0.1.0.tar.gz (36.4 kB) Copy SHA256 Checksum SHA256 Source Aug 25, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting