Releases: sparckles/Robyn
Releases · sparckles/Robyn
Support for Sync Functions
Robyn now supports non blocking (to some extent) sync functions.
You can now use def fx
if your library is not await
supported.
from robyn import Robyn
import asyncio
app = Robyn()
@app.get("/")
async def h():
print("This is the message from coroutine")
return "not sleep function"
@app.get("/sleep")
async def sleeper():
await asyncio.sleep(5)
return "sleep function"
@app.get("/blocker")
def blocker():
import time
time.sleep(10)
return "blocker function"
app.start()
Improved performance | 50% faster in large cases
In this version , a major chunk of dead code has been removed.
- Async-std has been completely replaced my tokio
- Threadpool has been removed
- Non blocking sockets are being used
- Multiple requests can spawn at once now
Async Function Support added
Robyn now supports non blocking async functions and can be installed from pip
.
Installation
You can simply use Pip for installation.
pip install robyn
Usage
from robyn import Robyn
app = Robyn()
@app.get("/")
async def h():
return "Hello, world!"
app.start()