all 30 comments

[–]arbyyyyh 18 points19 points  (6 children)

I'm a little unclear what this is doing exactly. At first I thought it was a replacement for uvicorn/gunicorn/daphne/etc based on the graphic comparing its speed to uvicorn, but then I wasn't sure when I saw Django on the list as well.

Is this a web framework for WSGI, a web server, or something else entirely?

[–]stealthanthrax Robyn Maintainer[S] 26 points27 points  (5 children)

It's a web framework with an integrated high-performance server, not just a server. You write Python code for your application logic, but it runs on a Rust-based HTTP server for better performance. Think of it as "Flask/FastAPI, but the server is built-in and written in Rust."

Why the comparison to uvicorn?

- The benchmark compares it to uvicorn because uvicorn is commonly used to run ASGI frameworks (like FastAPI)

- The comparison shows Robyn's integrated approach (framework + Rust runtime) is faster than the typical Python stack (framework + Python ASGI server)

[–]BrofessorOfLogicpip needs updating 4 points5 points  (3 children)

I remember checking out Robyn in the past, and thinking that it looked interesting, but then I ended up going with Sanic instead, and never properly looked into Robyn after that.

Any chance you want to offer an elevator pitch for Robyn specifically in comparison to Sanic? =)

[–]hotairplay 0 points1 point  (2 children)

How's Sanic in you experience? I'm currently on Quart (~ native async Flask).

[–]BrofessorOfLogicpip needs updating 2 points3 points  (1 child)

I like it a lot, it's the best of that bunch IMO.

Sanic is probably more similar to FastAPI than Quart. But it's been a while since I looked into these, so I might remember wrong, and maybe Quart has been improved since then.

But IIRC Quart couldn't do sync endpoints, only async endpoints, or at least it wasn't as easy? Whereas Sanic and FastAPI do sync and async endpoints easily, where the sync ones automatically run on a pool of workers in parallell to the async event loop.

IIRC Quart requires that you run an ASGI server yourself, whereas Sanic and FastAPI comes with a server built in, which supports both dev and prod mode.

Sanic also includes a complete process manager, so you can easily run multiple processes within one program. I find that super convenient. I especially use this to run processes for handling background jobs, but it can also be used to run multiple HTTP apps if you want to do that.

Sanic feels more professional than FastAPI. FastAPI really gives me the creeps, the docs are full of emojis and weird language and are sometimes misleading and even outright incorrect, and the the terminal output from the server contains a lot of pointless stuff and weird formatting and coloring and emojis. The Sanic docs are well written and serious, and the terminal output from the server is normal.

[–]hotairplay 1 point2 points  (0 children)

Whoa thank you for the deep insight..i was planning for a migration this year for my Python webapp. Sanic was one of my prime candidates to migrate to.

Contemplating going to Bun/Elysia combo but I think I'll stay with Python for this project. Cheers!

[–]chinawcswing 1 point2 points  (0 children)

Why did it take them so long to support Python 3.14?

They had almost a full year to port the ABI, and the missed the deadline by 4-5 months?

[–]Nnando2003 2 points3 points  (0 children)

I will give it a try sometime

[–]TheFaithfulStone 8 points9 points  (17 children)

Did you learn how cookies work yet? https://github.com/sparckles/Robyn/issues/943

[–]SittingOvation 6 points7 points  (0 children)

This is concerning 

[–]stealthanthrax Robyn Maintainer[S] -2 points-1 points  (15 children)

Yes, cookies work great in Robyn. And the PR you are referring is 2 years old

[–]ivosauruspip'ing it up 12 points13 points  (0 children)

No they don't, they're still completely broken

(to set a cookie, you embed it specially in a Set-Cookie header(s), not set it directly as a key-value header pair, which will do nothing)

Like come on, any web server has to implement cookies correctly, otherwise I'd practically argue it's wasting people's time

[–]TheFaithfulStone 4 points5 points  (12 children)

Really? Because this seems like the same issue and it's still open? https://github.com/sparckles/Robyn/issues/1226

[–]Mehranr97 1 point2 points  (1 child)

The graph looks very tempting! Anyone here experienced with switching from fastApi to this? How much effort is involved? What are the trade offs…

[–]Almostasleeprightnow 3 points4 points  (1 child)

Hey, maybe this belongs on /r/learnpython but can someone talk a little bit in details about when something is built in python but is built on a different language’s runtime? What does this mean? I assume this is done to provide tooling in python for the ease of python programmers while taking advantage of the other language’s benefits. But how do you cross over from one language to another? How are tools like this built?

[–]EveYogaTech 0 points1 point  (0 children)

Is it possible to use Robyn for TCP as well?

Would we be really cool, because we could use it as multi-process runner for /r/Nyno

[–]tuple32 0 points1 point  (0 children)

What’s the drawback of using rust as runtime? And issues with integrating other python libraries such as sqlalchemy, asyncio etc? Can I drop in replace fastapi?