litestar-org / litestar

Production-ready, Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs
https://litestar.dev/
MIT License
5.66k stars 384 forks source link

Enhancement: Support RSGI Specification (granian) #3423

Closed gam-phon closed 7 months ago

gam-phon commented 7 months ago

Summary

Here is the specification

Basic Example

No response

Drawbacks and Impact

No response

Unresolved questions

No response


[!NOTE]
While we are open for sponsoring on GitHub Sponsors and OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.

Fund with Polar

JacobCoffee commented 7 months ago

Do you just want to be able to use Granian?

If so we have a plugin for that:

https://github.com/cofin/litestar-granian

It will become mainline in our work towards Litestar v3 where we remove the assumption/requirement of uvicorn

gam-phon commented 7 months ago

@JacobCoffee Thanks for your quick response and sharing the plugin.

Actually I am using this command

granian --interface asgi app:app

I wanted to run it with --interface rsgi

Great it will be available in Litestar v3, then please feel free to close this

Thank you

provinzkraut commented 7 months ago

It's unlikely. ASGI is ingrained quite deep into Litestar, and while we are trying to separate things a bit more, making it protocol agnostic is not a realistic goal at the moment. Because of this, we'd have to resort to adding an RSGI > ASGI translation layer, and I don't think there's anything to be gained from this.

gam-phon commented 7 months ago

Thank you for your quick response. I really appreciate it.