Features
Why Choose Sufast?
Experience the perfect blend of Python's simplicity and Rust's performance
Quick Start
Get Started in Minutes
Create your first high-performance API with just a few lines of code
1. Install Sufast
Install via pip with pre-compiled Rust binaries
pip install sufast2. Create Your App
Write your first API endpoint
from sufast import App
app = App()
@app.get("/")
def hello():
return {"message": "Hello from Sufast ๐"}
app.run()3. Run & Test
Start your server and test the endpoint
python app.py
# Visit http://localhost:8080Advanced Example
Build a complete API with multiple endpoints
Complete API Examplepython
from sufast import App
app = App()
# Sample data
users = {
"1": {"name": "Alice", "email": "alice@example.com"},
"2": {"name": "Bob", "email": "bob@example.com"}
}
@app.get("/")
def home():
return {"message": "Welcome to Sufast API ๐"}
@app.get("/users")
def get_users():
return {"users": list(users.values())}
@app.get("/users/{user_id}")
def get_user(user_id: str):
if user_id in users:
return {"user": users[user_id]}
return {"error": "User not found"}, 404
@app.post("/users")
def create_user():
return {"message": "User created"}, 201
app.run()Performance Benchmarks
Real-World Performance
See how Sufast compares to other popular web frameworks in production scenarios
Framework Comparison
Comprehensive benchmark results across key performance metrics
| Framework | Language | RPS | Latency (ms) | Memory (MB) | Startup (ms) | Developer UX |
|---|---|---|---|---|---|---|
| ๐ฆ Native Rust (Actix-Web) | ๐ฆ Rust | 56,000+๐ฅ | ~1.7 | ~20 | ~25 | โ ๏ธ Manual, low-level routing |
| ๐ Sufast (Rust + Python) Sufast | ๐ฆ Rust + ๐ Python | 52,000+๐ฅ | ~2.1 | ~25 | ~35 | โ FastAPI-style, intuitive |
| ๐ FastAPI (Uvicorn) | ๐ Python | 25,000+ | ~5.6 | ~60 | ~90 | โ Very Dev-Friendly |
| ๐ Node.js (Express) | JavaScript | 35,000+ | ~4.2 | ~50 | ~40 | โ Dev-Friendly |
52,000+
Requests per second
Near-native Rust performance with Python convenience
2.1ms
Average latency
Lightning-fast response times for better user experience
25MB
Memory usage
Efficient memory footprint perfect for containers