Requires Python 3.13+. Free-threaded 3.14t recommended for maximum throughput.
pip install turboapi
TurboAPI is a drop-in FastAPI replacement. Change one line:
- from fastapi import FastAPI
+ from turboapi import TurboAPI
app = TurboAPI()
@app.get("/")
async def root():
return {"message": "Hello, World!"}
@app.post("/items")
async def create_item(name: str, price: float):
return {"name": name, "price": price}uvicorn main:app --reload
Or use the built-in Zig HTTP server directly:
import turboapi turboapi.run(app, host="0.0.0.0", port=8000)
Zero-overhead request validation compiled to native code:
from turboapi import TurboAPI
from dhi import Model, Str, Int, EmailStr
class UserModel(Model):
name: Str(min_length=1, max_length=100)
email: EmailStr
age: Int(gt=0, le=150)
@app.post("/users")
async def create_user(user: UserModel):
return user| ✅ FastAPI-compatible route decorators | Stable |
| ✅ Zig HTTP server — 8-thread pool + keep-alive | Stable |
| ✅ dhi Zig-native JSON schema validation | Stable |
| ✅ Zero-copy response pipeline | Stable |
| ✅ Async handler support | Stable |
| ✅ OAuth2, Bearer, API Key security | Stable |
| ✅ Python 3.14t free-threaded support | Stable |
| ✅ Native FFI handlers (C/Zig, no Python) | Stable |
| 🔧 WebSocket support | In progress |
| 🔧 HTTP/2 and TLS | In progress |
| 🔧 Cloudflare Workers WASM target | In progress |