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!
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
usage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev] [--log-level LOG_LEVEL]
Robyn, a fast async web framework with a rust runtime.
options:
-h, --help show this help message and exit
--processes PROCESSES
Choose the number of processes. [Default: 1]
--workers WORKERS Choose the number of workers. [Default: 1]
--dev Development mode. It restarts the server based on file changes.
--log-level LOG_LEVEL
Set the log level name
--create Create a new project template.
--docs Open the Robyn documentation.
--open-browser Open the browser on successful start.
--version Show the Robyn version.
--compile-rust-path COMPILE_RUST_PATH
Compile rust files in the given path.
--create-rust-file CREATE_RUST_FILE
Create a rust file with the given name.
--disable-openapi Disable the OpenAPI documentation.
--fast Enable the fast mode.
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:
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: