Skip to content

BustAPI is a high-performance, Python web framework built with a Rust backend using PyO3. It combines Flask/FastAPI simplicity with modern async capabilities and superior performance.

License

Notifications You must be signed in to change notification settings

GrandpaEJ/BustAPI

Repository files navigation

🚀 BustAPI

BustAPI Logo

The Ultra-High Performance Python Web Framework
Powered by Rust. Designed for Python. Built for the Future.

PyPI CI Versions License


⚡ What is BustAPI?

BustAPI isn't just another web framework. It's a hybrid engine that fuses the developer experience of Python with the raw performance of Rust.

By running on top of Actix-Web (Rust) via PyO3 bindings, BustAPI eliminates the bottlenecks typical of Python frameworks. It handles requests, routing, and concurrency in compiled Rust code, leaving Python to do what it does best: business logic.

"It feels like Flask/FastAPI, but runs like a compiled binary."

🌌 Future-Proof Architecture

🚀 Performance First

  • ~20k RPS: Capable of handling massive loads on a single node.
  • Zero-Process Overhead: Efficient, low-latency request handling.

🧠 Intelligent Concurrency

  • Native Async: Built on Tokio, the industry-standard Rust async runtime.
  • Smart Worker Pool: Rust manages the thread pool, automatically scaling to your CPU cores.

🛠️ Developer Experience (DX)

  • Hot Reload: Instant feedback loop with watchfiles integration.
  • Type-Safe: Built with modern Python typing in mind.
  • Auto-Docs: Interactive Swagger/OpenAPI documentation generated automatically.

📦 Installation

Install the core framework:

pip install bustapi

If you need ASGI / WSGI

Install with standard server compatibility (Uvicorn, Gunicorn, Hypercorn):

pip install "bustapi[server]"

Or go full throttle with all dev tools and benchmarks:

pip install "bustapi[full]"

🏁 Quick Start

Create main.py:

from bustapi import BustAPI

app = BustAPI()

@app.route("/")
def home():
    return {"message": "Welcome to the future 🚀"}

@app.route("/users/<int:user_id>")
def get_user(user_id):
    return {"id": user_id, "status": "active"}

if __name__ == "__main__":
    # Hot reload enabled!
    app.run(debug=True)

Run it:

python main.py

Visit http://127.0.0.1:5000 and confirm your entry into high-speed web development.


🔌 Server & Deployment

BustAPI is flexible. Use the ultra-fast internal Rust server, or bring your own.

Rust Engine (Default)

Optimized for raw speed.

python main.py

ASGI (Uvicorn)

uvicorn main:app.asgi_app --interface asgi3

WSGI (Gunicorn)

gunicorn main:app

🛡️ Key Features

  • Rate Limiting: Built-in, high-performance rate limiter protected by Rust.
  • Middleware: Simple @app.before_request and @app.after_request hooks.
  • Blueprints: Organizing extensive applications with ease.
  • Templates: Integrated Jinja2 support.
  • Security: Robust headers and CORS support out of the box.

✨ New in v0.5.0

  • FastAPI Compatibility: Migrate easily with Header, Cookie, Form, File, and UploadFile support.
  • Context Globals: Full support for Flask-style g and current_app proxies.
  • Background Tasks: Fire-and-forget tasks with BackgroundTasks.
  • Response Aliases: Use JSONResponse, HTMLResponse, etc., just like in FastAPI.

Benchmarks at a Glance

Framework Requests/Sec Relative Speed Memory (RAM)
BustAPI (v0.5) 25,782 🚀 100% ~24 MB
Catzilla (v0.2) 15,727 💨 61% ~718 MB
Flask (4 workers) 6,869 🐢 27% ~160 MB
FastAPI (4 workers) 1,867 🐢 7% ~237 MB

(Benchmarks run on Python 3.13, Intel i5-8365U, 8 Cores, Ubuntu Linux)


🤝 Contributing & Community

Join us in building the fastest Python framework ever created.

  • Issues: Report bugs or request features.
  • Discussions: Ask questions and share ideas.

📄 License

MIT © 2025 GrandpaEJ.

About

BustAPI is a high-performance, Python web framework built with a Rust backend using PyO3. It combines Flask/FastAPI simplicity with modern async capabilities and superior performance.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages