Skip to main content
TurboWeb Logo

TurboWeb

Lightning-fast Python web framework — ranked #1 in performance benchmarks.

Python License: MIT PyPI


Benchmark Results

Tested on October 11, 2026 · Higher RPS = better · Lower latency & error rate = better

Framework RPS Avg Latency Error %
Flask 566.0 441ms 1.4%
Django 686.2 364ms 8.5%
FastAPI 946.5 264ms 0.0%
Blacksheep 1,657.6 150ms 0.0%
Sanic 4,708.9 53ms 0.0%
TurboWeb-ASGI 12,196.4 20ms 0.0%
TurboWeb-WSGI 22,553.5 11ms 0.0%

Benchmark Overview

Throughput Comparison


Notes

TurboWeb priortizes speed & performance and easy migration

Installation

pip install turboweb

Quick Start

from turboweb import TurboWeb, response

app = TurboWeb()

@app.route("/")
def index(req):
    return response.json({"message": "Hello, TurboWeb!"})

@app.route("/user/<name>")
def greet(req, name):
    return response.text(f"Hello, {name}!")

@app.route("/api/data", methods=["POST"])
async def api_data(req):
    data = req.json
    return response.json({"received": data})

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

ASGI

from turboweb import TurboWeb

app = TurboWeb(mode="asgi") 

@app.route("/")
async def index(environ):
    return {"host": "TurboWeb-ASGI"}

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000, mode="asgi")

Middleware

@app.middleware("request")
def log_request(req):
    print(f"{req.method} {req.path}")

@app.middleware("response")
def add_header(req, resp):
    resp.headers.append(("X-Custom-Header", "TurboWeb"))
    return resp

CORS

app.cors(
    allow_origins=["https://example.com"],
    allow_methods=["GET", "POST"],
    allow_headers=["Content-Type"],
    allow_credentials=True
)

Static Files

app.static("/static", "./public")

Running with Workers

app.run(host="0.0.0.0", port=8000, workers=4)

Requirements

  • Python 3.7+
  • fastpysgi (installed automatically)

License

MIT License

Metadata

Release files for turboweb 26.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for turboweb 26.3
File Size Uploaded Provenance Actions
turboweb-26.3.tar.gz 17.5 kB Without provenance Details for turboweb-26.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for turboweb 26.3
File Interpreter ABI Platform Actions
turboweb-26.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for turboweb-26.3-cp310-cp310-win_amd64.whl

Total release size: 40.8 kB

Release files / turboweb-26.3.tar.gz

Download URL turboweb-26.3.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
faea612080f348b6731bb0f0460777842c1abe8dbcbe45aa1fe331b06739edb8
BLAKE2b-256 checksum
How to use checksums
e100fc018bd38b9acb18b6abaacea0ff763b68ee64d47e01f3bfdef0b59a0da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.8

Release files / turboweb-26.3-cp310-cp310-win_amd64.whl

Download URL turboweb-26.3-cp310-cp310-win_amd64.whl
Size 23.4 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
dac975dfc6141d2d165a4ee9989edde9517dfa435642e6edc6d6fcd4c874c80c
BLAKE2b-256 checksum
How to use checksums
2bac72ec53550ea5effb238e58beb52c2bfafd625974c852d681fd7a6008f5af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.8

Security for turboweb 26.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page