nahpackpy
nahpackpy is an HTTP/2 RFC 7541 HPACK library. It wraps the Rust nahpack library.
Usage
>>> from nahpackpy import Decoder
>>> decoder = Decoder()
>>> headers = decoder.decode_block(
b'\x82\x86\x84A\x8c\xf1\xe3\xc2\xe5\xf2:k\xa0\xab\x90\xf4\xff'
)
>>> for header in headers:
print(header)
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'www.example.com')
>>> from nahpackpy import Encoder
>>> encoder = Encoder()
>>> encoder.encode_block((
(b':method', b'GET'),
(b':scheme', b'http'),
(b':path', b'/'),
(b':authority', b'www.example.com'),
))
b'\x82\x86\x84A\x8c\xf1\xe3\xc2\xe5\xf2:k\xa0\xab\x90\xf4\xff'
Installation
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 rust-lang.org.
You can then create a wheel, which will contain the compiled shared library, by running make. Or, run python setup.py install to install in your current environment.
Misc
nahpackpy is licensed under the Mozilla Public License, Version 2.0.
Metadata
Release files for nahpackpy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nahpackpy-0.1.0.tar.gz | 36.4 kB | Without provenance | Details for nahpackpy-0.1.0.tar.gz |
Release files / nahpackpy-0.1.0.tar.gz
| Download URL | nahpackpy-0.1.0.tar.gz |
|---|---|
| Size | 36.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
104226e27346b016fa281cd1509da5aff8f9264e363bfec2c10198a96dcf06c0
|
|
BLAKE2b-256 checksum How to use checksums |
748941b8bf9559a75e8c02d94fe378559c8ed5a3e996ee78ddf56eb21084f4f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for nahpackpy 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.