4 ms·
Isn't this what sanic was supposed to be? https://github.com/channelcat/sanic https://github.com/channelcat/sanic
by mixmastamyk 9y ago
Isn't this what sanic was supposed to be?
https://github.com/channelcat/sanic https://github.com/channelcat/sanic
- abuckenheimer 9y ago+1 been using sanic for a couple years, it's an awesome easily grokable micro framework. Sanic is flask-like in a lot of places where a quick perusal of the quart code makes it look like they go an extra mile on the flask scale, but maybe take up some complexity in that process. Up to the consumer on which trade off they pick. I tend to think that since there is no WSGI equivalent for asyncio (something people are thinking about https://github.com/channelcat/sanic/issues/761 https://github.com/channelcat/sanic/issues/761) you want a slightly different model than flask anyway.
- je42 9y agothere is ASGI https://github.com/django/asgiref/blob/master/specs/asgi.rst https://github.com/django/asgiref/blob/master/specs/asgi.rst but i am not sure how broadly as a common spec this has been accepted.
- ergo14 9y agoUnlike flask and OP's solution sanic seems to have a saner API without global request object.
- pgjones 9y agoSanic is Flask-like, whereas Quart is the Flask-API (some Flask extensions work with Quart https://pgjones.gitlab.io/quart/flask_extensions.html#supported-extensions https://pgjones.gitlab.io/quart/flask_extensions.html#suppor...). The key part I wanted to highlight here though is that Quart serves HTTP/2, which I think sets it apart from most of the other Python frameworks. (I know Twisted also does this https://medium.com/python-pandemonium/how-to-serve-http-2-using-python-5e5bbd1e7ff1 https://medium.com/python-pandemonium/how-to-serve-http-2-us...)