Package: robyn
RobynRobyn is a High-Performance, Community-Driven, and Innovator Friendly Web Framework with a Rust runtime. You can learn more by checking ourcommunity resources!Source:TechEmpower Round 22📦 InstallationYou can simply use Pip for installation.pip install robynOr, withconda-forgeconda install -c conda-forge robyn🤔 Usage🚀 Define your APITo define your API, you can add the following code in anapp.pyfile.fromrobynimportRobynapp=Robyn(__file__)@app.get("/")asyncdefh(request):return"Hello, world!"app.start(port=8080)🏃 Run your codeSimply run the app.py file you created. You will then have access to a server on thelocalhost:8080, that you can request from an other program. Robyn provides several options to customize your web server.$ python3 app.pyTo see the usageusage: 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.Log level can beDEBUG,INFO,WARNING, orERROR.When running the app using--open-browsera new browser window will open at the app location, e.g:$ python3 app.py --open-browser💻 Add more routesYou can add more routes to your API. Check out the routes inthis fileas examples.🐍 Python Version SupportRobyn is compatible with the following Python versions:Python >= 3.8It 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💡 FeaturesUnder active development!Written in Rust, btw xDA multithreaded RuntimeExtensibleA simple APISync and Async Function SupportDynamic URL RoutingMulti Core ScalingWebSockets!MiddlewaresDependency InjectionHot ReloadingDirect Rust IntegrationCommunity First and truly FOSS!🗒️ How to contribute🏁 Get startedPlease read thecode of conductand go throughCONTRIBUTING.mdbefore 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 architecturehere.If you still need help to get started, feel free to reach out on ourcommunity discord.⚙️ To Develop LocallyInstall the development dependencies:poetry install --with dev --with testInstall the pre-commit git hooks:pre-commit installRunmaturin developormaturin develop --cargo-extra-args="--features=io-uring"for using the experimental version of actix-web. This command will build the Robyn Rust package and install it in your virtual environment.Runpoetry run test_server. This will run a server containing several examples of routes we use for testing purposes. You can see them atintegration_tests/base_routes.py. You can modify or add some to your likings.You can then request the server you ran from an other terminal. Here is aGETrequest done usingcurlfor example:curlhttp://localhost:8080/sync/str✨ Special thanks✨ Contributors/SupportersThanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.Special thanks to thePyO3community andAndrew from PyO3-asynciofor their amazing libraries and their support for my queries. 💖✨ SponsorsThese sponsors help us make the magic happen!Shivay LambaStar History