Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

Robyn

> 后端框架
Open source

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.

7.3K stars0 likes1 views
WebsiteGitHub

About

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.

Robyn

Robyn is a High-Performance, Community-Driven, and Innovator Friendly Web Framework with a Rust runtime. You can learn more by checking our community resources and following us on LinkedIn!

Source: TechEmpower Round 22

Installation

You can simply use Pip for installation.

bash
pip install robyn

Or, with conda-forge

bash
conda install -c conda-forge robyn

To install with all optional features (Pydantic validation, Jinja2 templating):

bash
pip install "robyn[all]"

Usage

Define your API

To define your API, you can add the following code in an app.py file.

python
from robyn import Robyn

app = Robyn(__file__)

@app.get("/")
async def h(request):
    return "Hello, world!"

app.start(port=8080)

Run your code

Simply run the app.py file you created. You will then have access to a server on the localhost:8080, that you can request from an other program. Robyn provides several options to customize your web server.

$ python3 app.py

To see the usage

…

Log level can be DEBUG, INFO, WARNING, or ERROR.

When running the app using --open-browser a new browser window will open at the app location, e.g:

$ python3 app.py --open-browser

Add more routes

You can add more routes to your API. Check out the routes in this file as examples.

Python Version Support

Robyn is compatible with the following Python versions:

Python >= 3.10

It is recommended to use the latest version of Python for the best performances.

Please make sure you have the correct version of Python installed before starting to use this project. You can check your Python version by running the following command in your terminal:

bash
python --version

Features

  • Under active development!
  • A multithreaded Runtime
  • Extensible
  • A simple API
  • Sync and Async Function Support
  • Dynamic URL Routing
  • Multi Core Scaling
  • WebSockets
  • Middlewares (before and after request hooks)
  • Built in form data handling
  • Dependency Injection
  • Hot Reloading
  • Direct Rust Integration
  • Automatic OpenAPI generation
  • Jinja2 Templating
  • Static File Serving
  • File Responses and Downloads
  • Authentication Support
  • CORS Configuration
  • Streaming / SSE Responses
  • Startup and Shutdown Events
  • Exception Handling
  • SubRouters
  • Project Scaffolding via CLI
  • Experimental io-uring Support
  • ** AI Agent Support** - Built-in agent routing and execution
  • ** MCP (Model Context Protocol)** - Connect to AI applications as a server
  • Community First and truly FOSS!

️ How to contribute

Get started

Please read the code of conduct and go through CONTRIBUTING.md before contributing to Robyn. Feel free to open an issue for any clarifications or suggestions.

If you're feeling curious. You can take a look at a more detailed architecture here.

If you still need help to get started, feel free to reach out on our community discord.

⚙️ To Develop Locally

Prerequisites

Before starting, ensure you have the following installed:

  • Python >= 3.10, <= 3.14
  • Rust (latest stable)
  • C compiler (gcc/clang)

Setup

  • Clone the repository:

    bash
    git clone https://github.com/sparckles/Robyn.git
  • Setup a virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate
  • Install required packages

    bash
    pip install pre-commit poetry maturin
  • Install development dependencies

    poetry install --with dev --with test
  • Install pre-commit git hooks

    pre-commit install
  • Build & install Robyn Rust package

    maturin develop
  • Build & install Robyn Rust package (experimental)

    maturin develop --cargo-extra-args="--features=io-uring"
  • Run!

    poetry run test_server
  • Run all tests

    pytest
  • Run only the integration tests

    pytest integration_tests
  • Run only the unit tests (you don't need to be running the test_server for these)

    pytest unit_tests
  • Test (refer to integration_tests/base_routes.py for more endpoints)

    bash
    curl http://localhost:8080/sync/str
  • tip: One liners for testing changes!

    maturin develop && poetry run test_server
    
    maturin develop && pytest 
  • tip: For IO-uring support, you can use the following command:

    maturin develop --cargo-extra-args="--features=io-uring"
  • tip: To use your local Robyn version in other projects, you can install it using pip:

    bash
    pip install -e path/to/robyn/target/wheels/robyn-<version>-<python_version>-<platform>.whl

e.g.

bash
pip install -e /repos/Robyn/target/wheels/robyn-0.63.0-cp312-cp312-macosx_10_15_universal2.whl

Troubleshooting

If you face any issues, here are some common fixes:

  • install patchelf with pip install patchelf if you face patchelf not found issue during maturin develop (esp. on Arch Linux)
  • If you get Rust compilation errors, ensure you have a C compiler installed:
    • Ubuntu/Debian: sudo apt install build-essential
    • Fedora: sudo dnf install gcc
    • macOS: Install Xcode Command Line Tools
    • Windows: Install Visual Studio Build Tools

✨ Special thanks

✨ Contributors/Supporters

Thanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.

Special thanks to the PyO3 community and Andrew from PyO3-asyncio for their amazing libraries and their support for my queries.

✨ Sponsors

These sponsors help us make the magic happen!

Star History

Issues· 102 open

View all issuesOpen on GitHub
  • #1428

    serve_file() sends a literal 'Content-Type: None' header for unrecognized file extensions

    Updated Sep 27, 2026
  • #1446

    Make original request object or original request headers available in websocketadapter

    enhancementUpdated Sep 16, 2026
  • #1438

    Query parameters and path parameters are never percent-decoded

    Updated Sep 13, 2026
  • #1441

    Production mode robyn --log-level WARN use depricated log level

    bugUpdated Sep 13, 2026
  • #482

    Disable robyn logs in dev(default) mode

    enhancementgood first issuepycon-usCodeDay LabsUpdated Sep 7, 2026
  • #1432

    test: SSE tests use stream=True without closing response (test hygiene)

    Updated Aug 4, 2026
  • #1427

    ROBYN_BROWSER_OPEN=False paradoxically opens the browser

    Updated Jul 31, 2026
  • #1426

    robyn.env parser crashes with IndexError on a blank line

    Updated Jul 31, 2026
  • #1425

    Non-multipart request bodies ignore ROBYN_MAX_PAYLOAD_SIZE and a stream error panics the worker

    Updated Jul 31, 2026
  • #549

    Middleware significantly degrades performance

    Updated Jul 16, 2026

> Tags

Pythonasyncbackendhacktoberfesthttp-server

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架