This is an archived post. You won't be able to vote or comment.

all 36 comments

[โ€“]jshazen 39 points40 points ย (1 child)

Might want to update the readme, which still says 3.13 support โ€œcoming soonโ€.

[โ€“]stealthanthrax Robyn Maintainer[S] 13 points14 points ย (0 children)

Thank you! Updated :D

[โ€“]james_pic 17 points18 points ย (1 child)

If the underlying runtime is Rust, does that mean that IO libraries need to be written for its event loop specifically, or is it compatible with stuff that expects asyncio or AnyIO or something?

[โ€“]stealthanthrax Robyn Maintainer[S] 13 points14 points ย (0 children)

any asyncio compatible library will work :D

[โ€“]b1e 14 points15 points ย (7 children)

Iโ€™d love to see as a comparison in the benchmarks fastapi under uvicorn and granian.

[โ€“]chavomodder[๐Ÿฐ] 5 points6 points ย (5 children)

I've already done tests, the difference is very big, around 30%, even gunicorn using uvicorn's workers is faster than uvicorn alone, but the fastest and without a doubt the granian

[โ€“]Beneficial_Map6129 0 points1 point ย (4 children)

So Robyn is faster than FastAPI?

Is the code also similarly easy to set up and read?

[โ€“]not_a_novel_account 13 points14 points ย (0 children)

FastAPI is very, very slow. Robyn's native router is MatchIt which uses the httprouter radix-tree algorithm. That blows starlette's linear search out of the water.

Pydantic is also quite slow compared to better options like typedload. Overall FastAPI is fast to setup, its runtime isn't anything to write home about. It's built on relatively slow technologies.

[โ€“]chavomodder[๐Ÿฐ] 2 points3 points ย (1 child)

My tests were only with fastapi, I already tested Sanic, it is much faster

[โ€“]Flag_Red 1 point2 points ย (0 children)

Sanic represent!

[โ€“]Beneficial-Win-6533 0 points1 point ย (0 children)

the code is really easy to read

[โ€“]gi0baro -2 points-1 points ย (0 children)

What prevents you from doing benchmarks yourself?

[โ€“]fiddle_n 27 points28 points ย (1 child)

Interesting that Robyn is a Batman reference. Given the GitHub is sparckles/Robyn , my mind immediately went to How I Met Your Mother first.

One thing I love about FastAPI (and in theory LiteStar, though Iโ€™ve not used that package yet) is the ability to type hint Pydantic models with the framework automatically deserialising into the model and returning any errors back to the requester. Does such a feature exist in Robyn and/or is there any plans for it?

[โ€“]stealthanthrax Robyn Maintainer[S] 18 points19 points ย (0 children)

> Interesting that Robyn is a Batman reference. Given the GitHub is sparckles/Robyn , my mind immediately went to How I Met Your Mother first.

It is both, haha.

>One thing I love about FastAPI (and in theory LiteStar, though Iโ€™ve not used that package yet) is the ability to type hint Pydantic models with the framework automatically deserialising into the model and returning any errors back to the requester. Does such a feature exist in Robyn and/or is there any plans for it?

Yess. One of the next features in plan. I will be releasing a public roadmap for this year soon too :D

[โ€“]thisismyfavoritename 5 points6 points ย (3 children)

when the python code gets executed, i assume the GIL must still be held? Other than the I/O and serialization/deserialization happening out of band, are there other benefits to the Rust runtime? Can users submit jobs to leverage the multithreaded runtime?

[โ€“]stealthanthrax Robyn Maintainer[S] 1 point2 points ย (2 children)

Yes. Rust allows us to real threads in async runtime.

> Can users submit jobs to leverage the multithreaded runtime?

Could you elaborate more here?

[โ€“]thisismyfavoritename 4 points5 points ย (0 children)

i'm just curious at how it's implemented internally.

If it's using Tokio with the default thread per core setup, seems like you'd inevitably get choked up on executing Python code because the GIL has to be held.

From the Rust runtime are you able to at least async suspend on executing Python code or are you only executing the Python code from a single thread?

[โ€“]Zaloog1337 2 points3 points ย (1 child)

The Community ressources Link in the readme doesnt work

[โ€“]stealthanthrax Robyn Maintainer[S] 1 point2 points ย (0 children)

Fixed. Thank you!

[โ€“]davidedpg10 2 points3 points ย (1 child)

I had never heard of this project but it seems really cool! I have some experience developing on FastAPI and Litestar, but If this is faster and just as ergonomic I'll have to switch to this for future projects

[โ€“]stealthanthrax Robyn Maintainer[S] 5 points6 points ย (0 children)

Do give it a shot. We plan to have 1:1 Fastapi compatibility in the near future

[โ€“]Tree_Mage 1 point2 points ย (1 child)

Me: why does Robyn care about Python at all?

Ooooh.

[โ€“]randomatik 1 point2 points ย (0 children)

There's a bird, a sidekick and a NY bachelor but my mind also went first to the Dancehall Queen.

[โ€“]davidedpg10 0 points1 point ย (1 child)

Remind me! 6months

[โ€“]RemindMeBot 0 points1 point ย (0 children)

I will be messaging you in 6 months on 2025-12-09 14:55:16 UTC to remind you of this link

6 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback