Python web framework benchmarks: performance comparison
The fastest Python web framework in HttpArena is mq-bridge-py, with a composite of 1571 on HTTP/1.1 — 49 of 88 against every language in its league. Measured over Alpha Round, every entry on the same machine. The leading Python HTTP engine is fastpysgi-wsgi, 25 of 46 in its own league. The leading experimental Python framework is mipyre, 19 of 32 in its own league.
Compare any two Python entries profile by profile →
Every Python entry in the benchmark, compared on the composite score of each family, one table per league. The composite sums a normalized score over the profiles of that family, where the leader of each profile scores 1,000, and scales the sum by the entry's completeness factor. Frameworks, engines, experimental entries and infrastructure are separate leagues: each is normalized against its own leader, and they do not all count the same profiles, so a composite compares with the others in its table and with nothing outside it. Rank in its league is the entry's place across all languages; rank among Python narrows the same field to this language. Both link through to the board view they were taken in. How the score works.
To set two entries from different leagues against each other, compare them head to head: that table lines up every test both of them ran.
Composite scores compare directly across every row of a table. Ranks do not always share a field: a tuned entry has no place in the standard-only ranking, so its rank is taken from the field that includes tuned entries and counts more of them.
HTTP/1.1
Frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| mq-bridge-py | Emerging | 1571 | 49 of 88 | 1 of 9 |
| aiohttp | Flagship | 1447 | 52 of 88 | 2 of 9 |
| blackbull | Emerging | 1100 | 68 of 88 | 3 of 9 |
| starlette | Flagship | 1082 | 69 of 88 | 4 of 9 |
| sanic | Flagship tuned | 1018 | 93 of 114 | 5 of 12 |
| litestar | Flagship | 963 | 72 of 88 | 5 of 9 |
| fastapi | Flagship | 860 | 75 of 88 | 6 of 9 |
| robyn | Emerging | 607 | 80 of 88 | 7 of 9 |
| slimeweb | Emerging tuned | 428 | 105 of 114 | 9 of 12 |
| bottle | Flagship tuned | 178 | 110 of 114 | 10 of 12 |
| flask | Flagship | 175 | 85 of 88 | 8 of 9 |
| django | Flagship | 117 | 87 of 88 | 9 of 9 |
Engines
| Engine | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| fastpysgi-wsgi | Engine | 2458 | 25 of 46 | 1 of 3 |
| uvicorn | Engine | 1267 | 30 of 46 | 2 of 3 |
| fastpysgi-asgi | Engine | 1080 | 37 of 46 | 3 of 3 |
Experimental frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| mipyre | Experimental | 3200 | 19 of 32 | 1 of 2 |
| veil-python | Experimental | 350 | 32 of 32 | 2 of 2 |
HTTP/2
Frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| mq-bridge-py | Emerging | 482 | 22 of 34 | 1 of 2 |
| blackbull | Emerging | 134 | 31 of 34 | 2 of 2 |
Experimental frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| mipyre | Experimental | 1130 | 12 of 18 | 1 of 2 |
| veil-python | Experimental | 605 | 15 of 18 | 2 of 2 |
HTTP/3
Experimental frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| veil-python | Experimental | 250 | 9 of 11 | — |
gRPC
Experimental frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| mipyre | Experimental | 286 | 7 of 8 | 1 of 2 |
| veil-python | Experimental | 6 | 8 of 8 | 2 of 2 |
WebSocket
Frameworks
Experimental frameworks
| Framework | Type | Composite | Rank in its league | Rank among Python |
|---|---|---|---|---|
| veil-python | Experimental | 50 | 23 of 23 | — |
Questions
What is the fastest Python web framework?
mq-bridge-py leads the Python web frameworks in HttpArena with a composite score of 1571 on HTTP/1.1, measured over Alpha Round. The composite sums a normalized score across the profiles of a family, where the leader of each profile scores 1,000. Against every language, mq-bridge-py ranks 49 of 88 in its league.
What is the fastest Python HTTP engine?
fastpysgi-wsgi leads the Python HTTP engines in HttpArena with a composite score of 2458 on HTTP/1.1, measured over Alpha Round. Against every language, fastpysgi-wsgi ranks 25 of 46 in its league.
What is the fastest experimental Python framework?
mipyre leads the experimental Python frameworks in HttpArena with a composite score of 3200 on HTTP/1.1, measured over Alpha Round. Against every language, mipyre ranks 19 of 32 in its league.
Why are Python entries ranked in separate leagues?
HttpArena ranks web frameworks, HTTP engines, and experimental frameworks apart. Each league is normalized against its own leader, and the leagues do not all count the same profiles - engines are not scored on JSON Compressed, for one. A composite from one league is therefore not on the same scale as a composite from another, and the higher number across two leagues is not the faster server. To set two entries from different leagues against each other, use the Python head-to-head comparison, which lines up every test both of them ran.
What is the fastest Python HTTP/2 server?
Among web frameworks, mq-bridge-py (composite 482, 22 of 34 in that league); among experimental frameworks, mipyre (composite 1130, 12 of 18 in that league). The leagues are scored separately, so those composites are not on one scale.
What is the fastest Python HTTP/3 server?
veil-python, with a composite of 250 on HTTP/3 and 9 of 11 against all languages in its league.
What is the fastest Python gRPC server?
mipyre, with a composite of 286 on gRPC and 7 of 8 against all languages in its league.
What is the fastest Python WebSocket server?
Among web frameworks, blackbull (composite 172, 30 of 31 in that league); among experimental frameworks, veil-python (composite 50, 23 of 23 in that league). The leagues are scored separately, so those composites are not on one scale.
How many Python web frameworks are benchmarked?
17 Python entries are measured, covering HTTP/1.1, HTTP/2, HTTP/3, gRPC, WebSocket. Every one runs on the same machine, in the same round (Alpha Round), against the same profiles.
Is Python fast for web servers?
The leading Python web framework, mq-bridge-py, places 49 of 88 on HTTP/1.1 across every language in its league, so that placing is the honest answer for Python at its best rather than for Python in general. The tables below show the spread across all 17 entries.
Every Python entry
- aiohttp
- blackbull
- bottle
- django
- fastapi
- fastpysgi-asgi
- fastpysgi-wsgi
- flask
- litestar
- mipyre
- mq-bridge-py
- robyn
- sanic
- slimeweb
- starlette
- uvicorn
- veil-python
Other languages
Assembly · C · C# · C++ · Clojure · D · Dart · Elixir · Erlang · F# · Go · Goose · Haskell · Java · JS · Julia · Koru · Kotlin · Lua · Luau · Mojo · OCaml · Perl · PHP · Ruby · Rust · Scala · Sober · Swift · TS · V · Valk · Zig
Results updated · Alpha Round · Compare two Python entries · All languages · Open the leaderboard