Skip to main content

HTTP/2 framing layer for Python

Project description

======================================
hyperframe: Pure-Python HTTP/2 framing
======================================

.. image:: https://travis-ci.org/python-hyper/hyperframe.png?branch=master
:target: https://travis-ci.org/python-hyper/hyperframe

This library contains the HTTP/2 framing code used in the `hyper`_ project. It
provides a pure-Python codebase that is capable of decoding a binary stream
into HTTP/2 frames.

This library is used directly by `hyper`_ and a number of other projects to
provide HTTP/2 frame decoding logic.

Contributing
============

hyperframe 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`_.

.. _read the contribution guidelines: http://hyper.readthedocs.org/en/development/contributing.html

License
=======

hyperframe is made available under the MIT License. For more details, see the
``LICENSE`` file in the repository.

Authors
=======

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

.. _hyper: http://python-hyper.org/


Release History
===============

3.0.1 (2016-01-08)
------------------

**Bugfixes**

- Fix issue where unpadded DATA, PUSH_PROMISE and HEADERS frames that had empty
bodies would raise ``InvalidPaddingError`` exceptions when parsed.

3.0.0 (2016-01-08)
------------------

**Backwards Incompatible API Changes**

- Parsing padded frames that have invalid padding sizes now throws an
``InvalidPaddingError``.

2.2.0 (2015-10-15)
------------------

**API Changes**

- When an unknown frame is encountered, ``parse_frame_header`` now throws a
``ValueError`` subclass: ``UnknownFrameError``. This subclass contains the
frame type and the length of the frame body.

2.1.0 (2015-10-06)
------------------

**API Changes**

- Frames parsed from binary data now carry a ``body_len`` attribute that
matches the frame length (minus the frame header).

2.0.0 (2015-09-21)
------------------

**API Changes**

- Attempting to parse unrecognised frames now throws ``ValueError`` instead of
``KeyError``. Thanks to @Kriechi!
- Flags are now validated for correctness, preventing setting flags that
``hyperframe`` does not recognise and that would not serialize. Thanks to
@mhils!
- Frame properties can now be initialized in the constructors. Thanks to @mhils
and @Kriechi!
- Frames that cannot be sent on a stream now have their stream ID defaulted
to ``0``. Thanks to @Kriechi!

**Other Changes**

- Frames have a more useful repr. Thanks to @mhils!

1.1.1 (2015-07-20)
------------------

- Fix a bug where ``FRAME_MAX_LEN`` was one byte too small.

1.1.0 (2015-06-28)
------------------

- Add ``body_len`` property to frames to enable introspection of the actual
frame length. Thanks to @jdecuyper!

1.0.1 (2015-06-27)
------------------

- Fix bug where the frame header would have an incorrect length added to it.

1.0.0 (2015-04-12)
------------------

- Initial extraction from `hyper`_.

.. _hyper: http://hyper.readthedocs.org/

Project details


Download files

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

Source Distribution

hyperframe-3.0.1.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperframe-3.0.1-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file hyperframe-3.0.1.tar.gz.

File metadata

  • Download URL: hyperframe-3.0.1.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hyperframe-3.0.1.tar.gz
Algorithm Hash digest
SHA256 2b75bc4b057170a9d12f5c8507289871d6a049ff474bc5765be3f163dbf49337
MD5 0adb2aab96070e5d14d7e016d14afd00
BLAKE2b-256 32918f90b8500468d5ad5837d3ef48bc9c1e5bad388c0b6616da530eb569829a

See more details on using hashes here.

File details

Details for the file hyperframe-3.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for hyperframe-3.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ca86a8aa815f69f7c943cd11e6f4e544f26a87b23f3eac47bb91acbe5bc5d651
MD5 857f4f437d2c77f8de347bccd41cd532
BLAKE2b-256 94eef138a1113d6fa82370f56c2d8f062e2e8e67984854fd15830d7887627352

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page