TurboWeb
High-performance Python web framework with C extension for maximum speed.
Features
- Fast: C-accelerated core for high-throughput applications
- Async & Sync: Supports both asyncio and synchronous handlers
- ASGI/WSGI: Compatible with both ASGI and WSGI servers
- Routing: Dynamic route parameters with type conversion
- Middleware: Request/response middleware support
- CORS: Built-in CORS configuration
- Static Files: Serve static files efficiently
- File Uploads: Multipart form data parsing
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)
Async Support
@app.route("/async")
async def async_handler(req):
await asyncio.sleep(0.1)
return response.json({"status": "done"})
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 1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| turboweb-1.3.tar.gz | 13.2 kB | Without provenance | Details for turboweb-1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| turboweb-1.3-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details for turboweb-1.3-cp310-cp310-win_amd64.whl |
Total release size: 32.0 kB
Release files / turboweb-1.3.tar.gz
| Download URL | turboweb-1.3.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b1e17194af03fdbf5c606eb5f9f21ce6b8894effb4d352982d734892b661097
|
|
BLAKE2b-256 checksum How to use checksums |
52cbf138428c176987327aa524605c06ddd0eccc4c0831a667917b560c49d75c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.8
|
Release files / turboweb-1.3-cp310-cp310-win_amd64.whl
| Download URL | turboweb-1.3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 18.8 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ce9f0f59bb3de5e469f5dc24e01c4f5b03386693d96f28b8f249324784e993ee
|
|
BLAKE2b-256 checksum How to use checksums |
10068d56b883c23d788fe86d30dc248b0ebcc43b677f71839c28a91e02d85ae8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.8
|
Security for turboweb 1.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.