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.2

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.2
File Size Uploaded Provenance Actions
turboweb-26.2.tar.gz 17.3 kB Without provenance Details for turboweb-26.2.tar.gz

Built distribution (wheel)

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

Total release size: 40.6 kB

Release files / turboweb-26.2.tar.gz

Download URL turboweb-26.2.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1eb88a777134693c86e78f2dbae897468ab75cdf49ece3b0eb2c3e607faab9e5
BLAKE2b-256 checksum
How to use checksums
07e9bf88007550662721b42be0ad13388610301e01b483aa4b06cb41f58e03b3
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.2-cp310-cp310-win_amd64.whl

Download URL turboweb-26.2-cp310-cp310-win_amd64.whl
Size 23.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
3225fad47b3bf62d03f4c16b4883c8c53d9b616263f52bd13ccdd14d1174f9b9
BLAKE2b-256 checksum
How to use checksums
0e9afde43f0d55b85a2c1922c9bc58ba95e33956074bffffa4fa94b64081fb32
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.2

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