github sparckles/Robyn v0.10.0
v0.10.0 - Async Functions now supported in Web Sockets

latest releases: v0.72.2, v0.72.1, v0.72.0...
3 years ago

The latest version of Robyn supports async functions in WebSockets now!

Usage

@websocket.on("message")
async def connect():
    global i
    i+=1
    if i==0:
        return "Whaaat??"
    elif i==1:
        return "Whooo??"
    elif i==2:
        return "*chika* *chika* Slim Shady."
    elif i==3:
        i= -1
        return ""

@websocket.on("close")
async def close():
    return "Goodbye world, from ws"

@websocket.on("connect")
async def message():
    return "Hello world, from ws"

Important Note:

Async functions execute out of order. i.e. They do not block the actor in order to provide concurrent execution. However, if the order is essential for you while using async functions, try using sync functions for now or wait for a future release :D

What's Changed

New Contributors

Full Changelog: v0.9.0...v0.10.0

Thanks

Thanks to @Kludex @awestlake87 @ShadowJonathan @shivaylamba @messense for their help(Issues/PRs) with this release. 😄

Don't miss a new Robyn release

NewReleases is sending notifications on new releases.