gunicorn_h1c
Fast HTTP/1.1 parser for Gunicorn using picohttpparser
What it is and what it does
gunicorn_h1c is a high-performance HTTP/1.1 parser written in C and exposed to Python, designed as a drop-in replacement for Gunicorn's default Python parser. It uses SIMD instructions (SSE4.2 on x86, NEON on ARM) and lazy object creation to minimize overhead. The package provides multiple parsing modes: a basic dict-returning parser, a zero-copy fast parser with lazy property access, a callback-based protocol handler for asyncio integration, and raw offset-based parsing for maximum speed.
It handles common HTTP parsing tasks—extracting method, path, headers, and version—while enforcing limits matching Gunicorn's defaults. It can generate WSGI environ dicts or ASGI scope objects directly from raw HTTP data, supporting incremental parsing for streaming scenarios and chunked transfer encoding. The package is actively maintained, supports Python 3.9 through 3.14, and carries no known security vulnerabilities.
Use it for:
- Replace Gunicorn's Python HTTP parser to reduce per-request parsing latency in high-throughput WSGI applications.
- Build asyncio-based HTTP servers with callback-driven parsing via H1CProtocol for zero-copy request handling.
- Parse incoming HTTP requests in custom protocol handlers that need ASGI scope or WSGI environ generation.
- Implement incremental HTTP parsing in streaming or buffered I/O scenarios where requests arrive in fragments.
- Benchmark or profile HTTP parsing performance in web frameworks that need to measure request handling overhead.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fast HTTP/1.1 request and response parser for Gunicorn using SIMD-optimized picohttpparser, with zero-copy parsing and support for WSGI environ and ASGI scope generation.
Yes, with conditions. Install if you are running Gunicorn in a high-throughput environment where HTTP parsing is a measurable bottleneck and you can test compatibility with your specific platform and Gunicorn version. The package is actively maintained, permissively licensed, and has no known vulnerabilities, but its beta status and young release history (first release March 2026) mean production adoption should be preceded by performance testing and staging validation. Avoid if you need guaranteed long-term stability or support for niche architectures without a C compiler.
Install
gunicorn-h1c on PyPI
pip
pip install gunicorn-h1cuv
uv add gunicorn-h1cpoetry
poetry add gunicorn-h1cInstalling gunicorn_h1c
Before you install
Medium install friction due to compiled C extension (wheel provided for macOS ARM64 and likely other platforms). Package is actively maintained with recent commits and no known vulnerabilities. Beta status and young release history (first release March 2026) mean production use should be evaluated carefully.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, making it suitable for both open-source and proprietary projects.
Quickstart
pip install gunicorn_h1c
from gunicorn_h1c import parse_request
data = b"GET /path HTTP/1.1\r\nHost: localhost\r\n\r\n"
result = parse_request(data)
print(result['method']) # b'GET'
print(result['consumed']) # bytes consumed
Requires Python 3.9 or later. Compiled C extension; pre-built wheels available for common platforms, but installation on unsupported architectures may require a C compiler.
Verify before relying
- Whether pre-built wheels are available for platforms beyond macOS ARM64 (Linux x86_64, Windows, etc.)
- Real-world performance gains over httptools in production Gunicorn deployments
- Stability and compatibility with Gunicorn versions beyond the package's initial release window
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 116 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 128,058/month — #11,721 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gunicorn_h1c-0.6.5-cp312-cp312-macosx_11_0_arm64.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
gunicornGunicorn is a WSGI and ASGI HTTP server for…
permissive · top 1,000 on PyPI
HypercornHypercorn is an ASGI and WSGI web server…
permissive · top 5,000 on PyPI
uvicornUvicorn is an ASGI web server that runs async…
permissive · top 100 on PyPI
microversion-parseParses and validates OpenStack microversion…
permissive · top 15,000 on PyPI
uvicorn-workerIntegrates Uvicorn's ASGI server with…
permissive · top 5,000 on PyPI
types-gunicornProvides type stubs for gunicorn to enable…
permissive · top 15,000 on PyPI
a2wsgiConverts between WSGI and ASGI applications…
permissive · top 5,000 on PyPI
multipartParses multipart/form-data submissions with…
permissive · top 5,000 on PyPI
httprhttpr is a fast HTTP client for Python built on…
permissive · top 5,000 on PyPI