Skip to content
HTTP/2 State-Machine based protocol implementation
Python Other
  1. Python 99.7%
  2. Other 0.3%
Branch: master
Clone or download
alexwlchan Merge pull request #1200 from python-hyper/requires-io-master
[] dependency update on master branch
Latest commit 939271f Sep 21, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
_travis /usr/local/bin is not allowed Aug 2, 2019
docs Bump development version to 3.1.1dev0 Aug 2, 2019
h2 Bump development version to 3.1.1dev0 Aug 2, 2019
test Add support for positional arguments Aug 2, 2019
utils Missing branch terminator Mar 28, 2017
visualizer Improve visual quality a bit. Dec 7, 2016
.coveragerc Handle differences between hyperframe 3 and 4. Apr 13, 2016
.gitignore Add tox environment for testing Twisted. Oct 21, 2016
.travis.yml /usr/local/bin is not allowed Aug 2, 2019
CONTRIBUTORS.rst Shameless plug May 28, 2017
HISTORY.rst Bump development version to 3.1.1dev0 Aug 2, 2019
LICENSE Clarify copyright assignment. Jan 31, 2016 Package the new h2spec test files Aug 2, 2019
Makefile Switch publishing process to use signed releases. Apr 9, 2016
setup.cfg Initial commit Jun 24, 2015 Add ENABLE_CONNECT_PROTOCOL setting support Jan 21, 2019
test_requirements.txt [] dependency update Aug 25, 2019
tox.ini [] dependency update Sep 9, 2019


hyper-h2: HTTP/2 Protocol Stack

This repository contains a pure-Python implementation of a HTTP/2 protocol stack. It's written from the ground up to be embeddable in whatever program you choose to use, ensuring that you can speak HTTP/2 regardless of your programming paradigm.

You use it like this:

import h2.connection

conn = h2.connection.H2Connection()
conn.send_headers(stream_id=stream_id, headers=headers)
conn.send_data(stream_id, data)
events = conn.receive_data(socket_data)

This repository does not provide a parsing layer, a network layer, or any rules about concurrency. Instead, it's a purely in-memory solution, defined in terms of data actions and HTTP/2 frames. This is one building block of a full Python HTTP implementation.

To install it, just run:

$ pip install h2


Documentation is available at


hyper-h2 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.


hyper-h2 is made available under the MIT License. For more details, see the LICENSE file in the repository.


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

You can’t perform that action at this time.