Hypercorn
An ASGI and WSGI server supporting HTTP/2 and WebSockets, an alternative to Gunicorn for async apps.
Official Documentation ↗v0.16. Check the official docs for the latest API surface.Installation
pip install hypercornMethods
No methods match this filter.
Hypercorn runs ASGI applications with HTTP/1.1, HTTP/2, and WebSocket protocol support.
Key Features
- ASGI and WSGI app support
- HTTP/2 and WebSocket protocols
- TOML and CLI configuration
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
Security
Official security statements captured from the package documentation:
- 官方配置表对 insecure_bind 给出安全警告:SSL 选项不作用于这些绑定,须谨慎并参见 HTTP→HTTPS 重定向文档 — “The TCP host/address to bind to. SSL options will not apply to these binds. See bind for formatting options. Care must be taken! See HTTP -> HTTPS redirection docs.” (source: https://hypercorn.readthedocs.io/en/latest/how_to_guides/configuring.html, fetched 2026-11-08T18:05:00+08:00)
API reference evidence
Fetched from official sources on 2026-11-08T18:05:00+08:00 via WebFetch https://hypercorn.readthedocs.io/en/latest/how_to_guides/configuring.html;WebFetch https://hypercorn.readthedocs.io/en/latest/how_to_guides/binds.html;WebFetch https://raw.githubusercontent.com/pgjones/hypercorn/main/src/hypercorn/asyncio/__init__.py.
hypercorn.toml→ signature from https://hypercorn.readthedocs.io/en/latest/how_to_guides/binds.html; official text: “or within the configuration file, bind = [“0.0.0.0:5000”, “[::]:5000”]”hypercorn.asyncio.serve→ signature from https://raw.githubusercontent.com/pgjones/hypercorn/main/src/hypercorn/asyncio/__init__.py; official text: “async def serve( app: Framework, config: Config, *, shutdown_trigger: Callable[…, Awaitable] | None = None, mode: Literal[“asgi”, “wsgi”] | None = None, ) -> None: “”“Serve an ASGI or WSGI framework app given the confi”
FAQ
- When should I use Hypercorn over Uvicorn?
- When you need HTTP/2 or WSGI alongside ASGI. Uvicorn is lighter and very fast for HTTP/1.1 ASGI workloads.
- How do I enable HTTP/2?
- Configure TLS bind with a certificate; HTTP/2 in Hypercorn is negotiated over TLS via ALPN.
- Does it support WebSockets?
- Yes. Hypercorn implements the ASGI WebSocket protocol, so frameworks such as Quart and Starlette can use it.
Report a problem with this API docOpens a pre-filled issue on GitHub.