# BustAPI
**Repository Path**: newchina/BustAPI
## Basic Information
- **Project Name**: BustAPI
- **Description**: BustAPI 是一个高性能 Python Web 框架,结合了 Python 和 Rust 两者的优势:Python 的简单性和 Rust 的原始性能。
- **Primary Language**: Python
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 1
- **Created**: 2026-02-07
- **Last Updated**: 2026-03-29
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# BustAPI — High-Performance Python Web Framework
The fastest Python web framework for building REST APIs
Flask-like syntax • Rust-powered performance • Up to 20,000+ requests/sec
> [!IMPORTANT]
> **Migration Notice:** This project has officially moved to the **[RUSTxPY](https://github.com/RUSTxPY/BustAPI)** organization for better community maintenance and long-term stability. Please update your bookmarks and remotes.
---
## Example
```python
from bustapi import BustAPI
app = BustAPI()
@app.route("/")
def hello():
return {"message": "Hello, world!"}
if __name__ == "__main__":
app.run()
```
No ASGI servers needed. No complex configuration. Just run your file.
---
## 📦 Installation
```bash
pip install bustapi
```
**Supports:** Python 3.10 – 3.14 | Linux, macOS, Windows | x86_64 & ARM64
Pre-built wheels available — no Rust toolchain required!
---
## 🚀 Quick Start
**1. Create `app.py`:**
```python
from bustapi import BustAPI, jsonify
app = BustAPI()
@app.route("/")
def home():
return {"status": "running", "framework": "BustAPI"}
@app.route("/users/")
def get_user(user_id):
return jsonify({"id": user_id, "name": "Alice"})
@app.route("/greet", methods=["POST"])
def greet():
from bustapi import request
data = request.json
return {"message": f"Hello, {data.get('name', 'World')}!"}
if __name__ == "__main__":
app.run(debug=True) # Hot reload enabled
```
**2. Run it:**
```bash
python app.py
```
**3. Visit** `http://127.0.0.1:5000`
---
## ⚡ Turbo Routes
For **maximum performance**, use `@app.turbo_route()`. Path parameters are parsed entirely in Rust:
```python
# Zero-overhead static route
@app.turbo_route("/health")
def health():
return {"status": "ok"}
# Dynamic route with typed params (parsed in Rust)
@app.turbo_route("/users/")
def get_user(id: int):
return {"id": id, "name": f"User {id}"}
# Cached response (140k+ RPS!)
@app.turbo_route("/config", cache_ttl=60)
def get_config():
return {"version": "1.0", "env": "production"}
```
**Supported types:** `int`, `float`, `str`, `path`
> ⚠️ **Note:** Turbo routes skip middleware, sessions, and request context for speed. Use `@app.route()` when you need those features.
---
## 📊 Benchmarks
### Standard Routes (`@app.route()`)
| Platform | RPS | Mode |
|----------|----:|------|
| **Linux** | **~25,000** | Single-process |
| macOS | ~20,000 | Single-process |
| Windows | ~17,000 | Single-process |
### Turbo Routes (`@app.turbo_route()`) — Linux
| Configuration | RPS |
|---------------|----:|
| Static route | ~30,000 (single) |
| **Multiprocessing (4 workers)** | **~105,000** |
| **Cached (60s TTL)** | **~140,000** |
### Framework Comparison (Turbo + Multiprocessing)
---
## 🌍 Platform Support
### 🐧 Linux (Recommended for Production)
Linux delivers the **best performance** with native multiprocessing:
- **~25k RPS** standard routes, **100k+ RPS** with Turbo + multiprocessing
- Kernel-level load balancing via `SO_REUSEPORT`
- Automatic worker scaling to CPU cores
```bash
python app.py # Automatically uses multiprocessing
```
## 🌠 Star History
[](https://www.star-history.com/#GrandpaEJ/BustAPI&Date)
---
## 📄 License
[MIT](LICENSE) © 2025-2026 **[GrandpaEJ](https://github.com/GrandpaEJ)**
---
Built with 🦀 Rust + 🐍 Python
Fast. Simple. Production-ready.