Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Python
  3. granian

granian

BSD-3-ClauseRustv2.7.3

A high-performance Rust HTTP server for Python applications, supporting ASGI, RSGI, and WSGI interfaces.

GitHubGitHub
5.3k stars149 forks0 contributors

What is granian?

Granian is a Rust-based HTTP server specifically designed for Python applications. It serves ASGI, RSGI, and WSGI interfaces with support for HTTP/1, HTTP/2, websockets, and static files, aiming to provide a high-performance, single-dependency alternative to traditional Python server compositions like Gunicorn + uvicorn.

Target Audience

Python developers and DevOps engineers looking for a performant, modern HTTP server to deploy production web applications, especially those requiring HTTP/2, high concurrency, or websocket support.

Value Proposition

Developers choose Granian for its superior performance, simplified deployment with a single package, and robust support for modern HTTP features, making it ideal for high-throughput applications where traditional Python servers may be a bottleneck.

Overview

A Rust HTTP server for Python applications

Use Cases

Best For

  • Serving Python ASGI applications with HTTP/2 support
  • High-concurrency websocket applications
  • Deploying WSGI applications with improved performance
  • Production environments requiring stable throughput and metrics
  • Simplifying server dependencies in Python web projects
  • Applications needing direct static file serving alongside dynamic content

Not Ideal For

  • Projects requiring a pure Python toolchain for easier debugging and dependency management
  • Applications deeply integrated with trio or gevent concurrency libraries
  • Teams needing full ASGI specification support, including experimental extensions not yet implemented

Pros & Cons

Pros

Modern Protocol Support

Full HTTP/1, HTTP/2, and websocket handling with configurable options, as highlighted in the Features section, enabling high-performance applications.

High Throughput Architecture

Built on Rust's Hyper and Tokio, offering superior performance and stable benchmarks compared to traditional Python servers like Gunicorn.

Simplified Deployment Stack

Replaces the Gunicorn + uvicorn dependency composition with a single package, reducing complexity and improving deployment simplicity.

Integrated Static Serving

Direct static file serving with configurable routes and caching, eliminating the need for external middleware or servers.

Cons

Incomplete ASGI Compliance

Some ASGI extensions are not yet implemented, which may limit compatibility with frameworks relying on advanced features, as noted in the Rationale.

Configuration Complexity

Extensive options for workers, threads, backpressure, and runtime modes require deep tuning, which can be overwhelming without expertise.

Experimental Features

Free-threaded Python support is experimental and discouraged for production, posing risks for teams seeking stable, production-ready solutions.

Frequently Asked Questions

Quick Stats

Stars5,299
Forks149
Contributors0
Open Issues32
Last commit17 days ago
CreatedSince 2022

Tags

#http-server#asyncio#high-performance#http#python#asgi#http2#concurrency#rust#wsgi#websockets

Built With

h
hyper
R
Rust
T
Tokio
P
Python

Included in

Python290.8k
Auto-fetched 1 day ago

Related Projects

uvicornuvicorn

An ASGI web server, for Python. 🦄

Stars10,612
Forks933
Last commit2 days ago
gunicorngunicorn

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.

Stars10,548
Forks1,830
Last commit4 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub