jh2
HTTP/2 State-Machine based protocol implementation
Decision gist · record as of 2026-08-14
Yes. jh2 is actively maintained, has no runtime dependencies, supports Python 3.7–3.14, carries no known vulnerabilities, and is licensed permissively under MIT. It is a solid choice if you need a low-friction, embeddable HTTP/2 state machine. Install it if you are building HTTP/2 support and want to avoid managing separate packages.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained with a release within the last 77 days and current Python version support.
- Repository is not archived.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute jh2 with minimal restrictions; include the license text in distributions.
last release 2026-05-29 (77 days) · last repo commit 2026-08-01 · 3 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,893,994 downloads/mo, #3,456 on PyPI
Alternatives
Verify before relying
pip install jh2
import jh2.connection
import jh2.config
config = jh2.config.H2Configuration()
conn = jh2.connection.H2Connection(config=config)
conn.send_headers(stream_id=stream_id, headers=headers)
data_to_send = conn.data_to_send()- Performance comparison with h2 package and whether optimized build is available in this version
- Whether embedded leaf dependencies (hpack, hyperframe) are fully internal or partially exposed in the API
- Specific use-case performance characteristics versus the original h2 package
What it is and what it does
jh2 is a fork of the hyper/h2 HTTP/2 protocol stack that reimplements the state machine in pure Python with embedded dependencies for a cleaner dependency tree. It provides in-memory HTTP/2 frame handling—encoding headers and data into frames, managing connection state, and parsing incoming frames into events—but does not include network I/O, parsing layers, or concurrency primitives. You supply raw socket data and receive back frames to send and events to process.
The package is designed as a building block for HTTP/2 implementations. You create a connection object, call methods to queue headers and data, retrieve serialized frames via `data_to_send()`, and feed received bytes into `receive_data()` to get back protocol events. It works with any network transport or concurrency model you choose, making it suitable for embedding in async frameworks, synchronous servers, or custom HTTP clients.
Use it for
- Build HTTP/2 client libraries by handling protocol state and frame serialization without implementing the spec from scratch.
- Implement HTTP/2 servers that need frame-level control independent of a specific async runtime or socket library.
- Add HTTP/2 support to existing network libraries by wrapping jh2's state machine around your own I/O layer.
- Test HTTP/2 protocol compliance by using jh2 to generate and validate frames without network overhead.
- Embed HTTP/2 in embedded systems or constrained environments where a pure-Python, dependency-free implementation is preferred.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
jh2 is actively maintained, has no runtime dependencies, supports Python 3.7–3.14, carries no known vulnerabilities, and is licensed permissively under MIT. It is a solid choice if you need a low-friction, embeddable HTTP/2 state machine. Install it if you are building HTTP/2 support and want to avoid managing separate packages.
Install
jh2 on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained with a release within the last 77 days and current Python version support. Repository is not archived.
License in practice
MIT license (permissive) means you can use, modify, and distribute jh2 with minimal restrictions; include the license text in distributions.
Quickstart
pip install jh2
import jh2.connection
import jh2.config
config = jh2.config.H2Configuration()
conn = jh2.connection.H2Connection(config=config)
conn.send_headers(stream_id=stream_id, headers=headers)
data_to_send = conn.data_to_send()
Verify before relying
- Performance comparison with h2 package and whether optimized build is available in this version
- Whether embedded leaf dependencies (hpack, hyperframe) are fully internal or partially exposed in the API
- Specific use-case performance characteristics versus the original h2 package
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 77 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,893,994 / month, #3,456 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries |
Evidence: jh2-5.0.13-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “http2 state machine”
- jh2jh2 is a pure-Python HTTP/2 protocol state machine that handles frame…
- h2h2 is a pure-Python HTTP/2 protocol implementation that handles…
- hyperhyper is an HTTP/2 client library for Python that provides a…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also h2 · hpack · hyperframe · hyper · hyper-up · priority · httpcore2 · wsproto · httpx2 · httpx