Skip to content

Commit

Permalink
nuke left-over documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Dec 20, 2024
1 parent ae788d9 commit 53a18de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
20 changes: 11 additions & 9 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
hpack: HTTP/2 Header Compression for Python
===========================================
hpack: Pure-Python HTTP/2 Header Encoding
=========================================

hpack provides a simple Python interface to the `HPACK`_ compression algorithm,
used to compress HTTP headers in HTTP/2. Used by some of the most popular
HTTP/2 implementations in Python, HPACK offers a great Python interface as well
as optional upgrade to optimised C-based compression routines from `nghttp2`_.
used to encode HTTP headers in HTTP/2. Used by some of the most popular
HTTP/2 implementations in Python, the hpack library offers a great and simple
Python interface without any dependencies, strictly confirming to `RFC 7541`_..

Using hpack is easy:

.. code-block:: python
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)
hpack will transparently use nghttp2 on CPython if it's available, gaining even
better compression efficiency and speed, but it also makes available a
pure-Python implementation that conforms strictly to `RFC 7541`_.
Contents
--------
Expand All @@ -34,5 +37,4 @@ Contents


.. _HPACK: https://tools.ietf.org/html/rfc7541
.. _nghttp2: https://nghttp2.org/
.. _RFC 7541: https://tools.ietf.org/html/rfc7541
11 changes: 0 additions & 11 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,3 @@ Alternatively, feel free to download one of the release tarballs from
$ python setup.py install
hpack has no external dependencies.

Using nghttp2
-------------

If you want to use nghttp2 with hpack, all you need to do is install it along
with its Python bindings. Consult `nghttp2's documentation`_ for instructions
on how to install it.


.. _our GitHub page: https://github.com/python-hyper/hpack
.. _nghttp2's documentation: https://nghttp2.org/documentation/

0 comments on commit 53a18de

Please sign in to comment.