skillfed

gunicorn_h1c

Fast HTTP/1.1 parser for Gunicorn using picohttpparser

gunicorn-h1c v0.6.5 128.1K downloads/30d#11,721 on PyPI9
Permissive license MIT Active released

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-h1c

uv

uv add gunicorn-h1c

poetry

poetry add gunicorn-h1c

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: CProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: HTTP Servers

Tags

http/1.1 parsergunicorn http parsingfast request parserzero-copy http parsingasgi wsgi http parsersimd http parserpicohttpparser python
http-parsingperformance-criticalasgi-wsgi

More WWW/HTTP packages