Skip to main content

A web server that is fast!

Project description

Robyn Logo

Robyn

Twitter Gitter Downloads Code style: black GitHub tag License Discord

view - Documentation

Robyn is an async Python backend server with a runtime written in Rust, btw.

Check out the talk at PyCon Sweden 2021 about Robyn: An async python web framework with a Rust runtime

📦 Installation

You can simply use Pip for installation.

pip install robyn

Or, with conda-forge

conda install -c conda-forge robyn

🤔 Usage

from robyn import Robyn

app = Robyn(__file__)

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

app.start(port=5000)

💡 Features

  • Under active development!
  • Written in Rust, btw xD
  • A multithreaded Runtime
  • Extensible
  • A simple API
  • Sync and Async Function Support
  • Dynamic URL Routing
  • Multi Core Scaling
  • WebSockets!
  • Middlewares
  • Hot Reloading
  • Community First and truly FOSS!

🗒️ Contributor Guidelines

Feel free to open an issue for any clarification or for any suggestions.

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

⚙️ To Develop Locally

  1. Install the development dependencies: pip install -r dev-requirements.txt

  2. Install the pre-commit git hooks: pre-commit install

  3. Add more routes in the integration_tests/base_routes.py file(if you like).

  4. Run maturin develop or maturin develop --cargo-extra-args="--features=io-uring" (if you want to run the experimental version).

  5. Run python3 integration_tests/base_routes.py

🏃 To Run

python3 app.py -h

usage: app.py [-h] [--processes PROCESSES] [--workers WORKERS] [--dev DEV]

Robyn, a fast async web framework with a rust runtime.

optional arguments:
  -h, --help            show this help message and exit
  --processes PROCESSES : allows you to choose the number of parallel processes
  --workers WORKERS : allows you to choose the number of workers
  --dev DEV : this flag gives the option to enable hot reloading or not and also sets the default log level to debug
  --log-level LEVEL : this flag allows you to set the log level

✨ Contributors/Supporters

To contribute to Robyn, make sure to first go through the CONTRIBUTING.md.

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!

DigitalOcean Referral Badge

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robyn-0.19.1.tar.gz (764.3 kB view hashes)

Uploaded source

Built Distributions

robyn-0.19.1-cp310-none-win_amd64.whl (2.6 MB view hashes)

Uploaded cp310

robyn-0.19.1-cp310-none-win32.whl (2.4 MB view hashes)

Uploaded cp310

robyn-0.19.1-cp39-none-win_amd64.whl (2.6 MB view hashes)

Uploaded cp39

robyn-0.19.1-cp39-none-win32.whl (2.4 MB view hashes)

Uploaded cp39

robyn-0.19.1-cp38-none-win_amd64.whl (2.6 MB view hashes)

Uploaded cp38

robyn-0.19.1-cp38-none-win32.whl (2.4 MB view hashes)

Uploaded cp38

robyn-0.19.1-cp37-none-win_amd64.whl (2.6 MB view hashes)

Uploaded cp37

robyn-0.19.1-cp37-none-win32.whl (2.4 MB view hashes)

Uploaded cp37

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page