Skip to content

Releases: sparckles/Robyn

Support for Sync Functions

22 Jun 19:47
Compare
Choose a tag to compare

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

21 Jun 15:19
Compare
Choose a tag to compare

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

18 Jun 14:19
Compare
Choose a tag to compare

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()