h11
A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
Decision gist · record as of 2026-08-14
Yes, if you are building a custom HTTP client, server, or protocol tool and need fine-grained control over HTTP/1.1 handling without being locked into a specific I/O model. The library is mature, well-tested, and has no dependencies. Not suitable if you need a ready-to-use HTTP client (use requests instead) or a full web framework. The aging maintenance status (477 days since last release) is not a concern given the stable, feature-complete nature of the protocol it implements.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; no system dependencies.
- Installation is straightforward with no runtime dependencies.
- The package is aging (last release 477 days ago) but remains actively maintained; the repository is not archived and the last commit was recent.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.
last release 2025-04-24 (477 days) · last repo commit 2025-04-24 · 564 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 894,878,618 downloads/mo, #30 on PyPI
Alternatives
Verify before relying
pip install h11
import h11
conn = h11.Connection(h11.CLIENT)
req = h11.Request(method="GET", target="/", headers=[("Host", "example.com")])
data = conn.send(req)
data += conn.send(h11.EndOfMessage())- Performance characteristics and benchmarks compared to other HTTP/1.1 implementations.
- Real-world adoption rate and stability feedback from production users.
What it is and what it does
h11 is a low-level HTTP/1.1 protocol library that handles the mechanics of parsing incoming bytes into structured HTTP events and serializing HTTP events back into bytes. It implements RFC 7230 (HTTP/1.1 Message Syntax and Routing) with strict spec conformance, managing framing, keep-alive semantics, and header handling. The library is "bring-your-own-I/O": it contains no network code, so you can plug it into any I/O layer—synchronous, threaded, asynchronous, or custom—making it reusable across different async frameworks and network APIs.
The package is designed as a toolkit for building HTTP clients and servers, not as a drop-in replacement for higher-level libraries. You create an h11.Connection object to track protocol state, feed it incoming network bytes via receive_data(), and get back high-level event objects; conversely, you construct event objects (Request, Response, Data, EndOfMessage) and pass them to send() to get bytes to transmit. It is suitable for both client and server implementations with a symmetric API. The library is pure Python with no external dependencies, has 100% test coverage, and is approximately 800 lines of code.
Use it for
- Building custom HTTP clients or servers that need fine-grained control over protocol handling and I/O.
- Implementing HTTP support in async frameworks (Trio, asyncio, Curio) without reimplementing the protocol.
- Creating HTTP proxies, load balancers, or protocol analyzers that need to parse and manipulate HTTP messages.
- Integrating HTTP/1.1 support into embedded or constrained environments where you control the I/O layer.
- Testing HTTP protocol edge cases and spec compliance without network I/O overhead.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building a custom HTTP client, server, or protocol tool and need fine-grained control over HTTP/1.1 handling without being locked into a specific I/O model.
The library is mature, well-tested, and has no dependencies. Not suitable if you need a ready-to-use HTTP client (use requests instead) or a full web framework. The aging maintenance status (477 days since last release) is not a concern given the stable, feature-complete nature of the protocol it implements.
Install
h11 on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is aging (last release 477 days ago) but remains actively maintained; the repository is not archived and the last commit was recent.
Requires Python 3.8 or later; no system dependencies.
License in practice
MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install h11
import h11
conn = h11.Connection(h11.CLIENT)
req = h11.Request(method="GET", target="/", headers=[("Host", "example.com")])
data = conn.send(req)
data += conn.send(h11.EndOfMessage())
Verify before relying
- Performance characteristics and benchmarks compared to other HTTP/1.1 implementations.
- Real-world adoption rate and stability feedback from production users.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 477 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 894,878,618 / month, #30 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: System :: Networking |
Evidence: h11-0.16.0-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 › “HTTP/1.1 protocol parser”
- h11h11 is a pure-Python HTTP/1.1 protocol implementation that handles…
- gunicorn_h1cFast HTTP/1.1 request and response parser for Gunicorn using…
- uvicornUvicorn is an ASGI web server that runs async Python web…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP 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.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
yarl provides an immutable URL class for parsing, decomposing, and constructing URLs with automatic percent-encoding and decoding of URL components.
See also h2 · hyperframe · hpack · socksio · Hypercorn · jh2 · gunicorn_h1c · wsproto