granian
A Rust HTTP server for Python applications
Decision gist · record as of 2026-08-14
Yes. Granian is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and offers a pragmatic alternative to traditional multi-component stacks. Install it if you're running ASGI or WSGI applications and want modern HTTP/2 support and high throughput with minimal dependencies. Skip it only if you require pure Python, advanced debugging, or async frameworks outside asyncio.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; compiled wheels are provided for common platforms but building from source requires Rust.
- Medium install friction due to compiled wheels; however, the package maintains active development with a recent release and provides pre-built wheels for Python 3.10–3.14 across macOS, Linux, Windows, and ARM platforms, reducing build complexity for most users.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is a permissive license that allows commercial and private use with minimal restrictions, requiring only that you retain the license notice and disclaimer.
last release 2026-08-05 (9 days) · last repo commit 2026-08-05 · 5,551 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,217,288 downloads/mo, #1,408 on PyPI
Alternatives
Verify before relying
pip install granian
# Create main.py with an ASGI app:
async def app(scope, receive, send):
await send({'type': 'http.response.start', 'status': 200, 'headers': [[b'content-type', b'text/plain']]})
await send({'type': 'http.response.body', 'body': b'Hello, world!'})
# Run with: granian --interface asgi main:app- Whether the package's ASGI extension support (pathsend) covers all extensions your application requires.
- Performance characteristics under your specific workload and concurrency model compared to alternatives.
- Compatibility with async frameworks beyond asyncio (e.g., whether trio or gevent support is planned).
What it is and what it does
Granian is a production-ready HTTP server written in Rust that serves Python web applications. It acts as a single-package replacement for the traditional Gunicorn + uvicorn + http-tools stack on Unix systems, handling ASGI/3, RSGI, and WSGI application interfaces. The server is built on Hyper and Tokio, providing native HTTP/1 and HTTP/2 support, WebSocket handling, HTTPS and mTLS, and direct static file serving.
The package is designed for developers who prioritize throughput and modern HTTP protocol support. It requires only click as a runtime dependency and offers optional extras for environment file loading, process naming, reload-on-change, and alternative event loops (rloop, uvloop, winloop). Granian is not suitable if you need a pure Python solution, advanced debugging features, or support for trio/gevent-based applications.
Use it for
- Serving high-throughput ASGI applications (FastAPI, Starlette) where HTTP/2 performance matters.
- Running WSGI applications (Flask, Django) with a modern, single-dependency server instead of Gunicorn.
- Building WebSocket-heavy applications that require great concurrency and low latency.
- Deploying Python applications where you want to avoid the complexity of multiple server components.
- Running on ARM or non-standard platforms where pre-built wheels reduce build friction.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Granian is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and offers a pragmatic alternative to traditional multi-component stacks. Install it if you're running ASGI or WSGI applications and want modern HTTP/2 support and high throughput with minimal dependencies. Skip it only if you require pure Python, advanced debugging, or async frameworks outside asyncio.
Install
granian on PyPI
Before you install
Medium install friction due to compiled wheels; however, the package maintains active development with a recent release and provides pre-built wheels for Python 3.10–3.14 across macOS, Linux, Windows, and ARM platforms, reducing build complexity for most users.
Requires Python 3.10 or later; compiled wheels are provided for common platforms but building from source requires Rust.
License in practice
BSD-3-Clause is a permissive license that allows commercial and private use with minimal restrictions, requiring only that you retain the license notice and disclaimer.
Quickstart
pip install granian
# Create main.py with an ASGI app:
async def app(scope, receive, send):
await send({'type': 'http.response.start', 'status': 200, 'headers': [[b'content-type', b'text/plain']]})
await send({'type': 'http.response.body', 'body': b'Hello, world!'})
# Run with: granian --interface asgi main:app
Verify before relying
- Whether the package's ASGI extension support (pathsend) covers all extensions your application requires.
- Performance characteristics under your specific workload and concurrency model compared to alternatives.
- Compatibility with async frameworks beyond asyncio (e.g., whether trio or gevent support is planned).
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packageclick |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,217,288 / month, #1,408 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/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming 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 :: Free Threading :: 2 - BetaProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Internet :: WWW/HTTP |
Evidence: granian-2.8.1-cp310-cp310-macosx_10_12_x86_64.whl; granian-2.8.1-cp310-cp310-macosx_11_0_arm64.whl; granian-2.8.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; granian-2.8.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl; granian-2.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; granian-2.8.1-cp310-cp310-manylinux_2_28_aarch64.whl; granian-2.8.1-cp310-cp310-musllinux_1_1_aarch64.whl; granian-2.8.1-cp310-cp310-musllinux_1_1_armv7l.whl; granian-2.8.1-cp310-cp310-musllinux_1_1_x86_64.whl; granian-2.8.1-cp310-cp310-win_amd64.whl; granian-2.8.1-cp311-cp311-macosx_10_12_x86_64.whl; granian-2.8.1-cp311-cp311-macosx_11_0_arm64.whl; granian-2.8.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; granian-2.8.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl; granian-2.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; granian-2.8.1-cp311-cp311-manylinux_2_28_aarch64.whl; granian-2.8.1-cp311-cp311-musllinux_1_1_aarch64.whl; granian-2.8.1-cp311-cp311-musllinux_1_1_armv7l.whl; granian-2.8.1-cp311-cp311-musllinux_1_1_x86_64.whl; granian-2.8.1-cp311-cp311-win_amd64.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 › “rust http server python”
- granianGranian is a Rust-based HTTP server that runs ASGI, RSGI, and WSGI…
- pyqwestA Python HTTP client wrapping the Rust reqwest library, providing…
- ua-parser-rsProvides a Rust-accelerated user-agent parser that integrates as a…
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.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
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.
See also uvicorn · Hypercorn · sanic · falcon · gunicorn · uvicorn-worker · servestatic · asgiref · a2wsgi