Closed a137x closed 6 years ago
Duplicated to #208
Quart is not supported. The only supported asyncio frameworks at this time are aiohttp, Sanic and tornado.
On Mon, Oct 22, 2018, 9:24 AM a137x notifications@github.com wrote:
Good day @miguelgrinberg https://github.com/miguelgrinberg Please advise how to use python-socketio with Quart https://gitlab.com/pgjones/quart I tried to marry them with no luck. Then I raised an issue https://gitlab.com/pgjones/quart/issues/150 in Quart project and was advised to find support here.
Best regards, Andrew
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miguelgrinberg/python-socketio/issues/209, or mute the thread https://github.com/notifications/unsubscribe-auth/AClwzlBRqLG_MzePaL1gRcLeS5yXAU-6ks5unYC_gaJpZM4Xy-qX .
Hey, what can I use for quart if we can't use SocketIO
The information above is outdated. These days python-socketio supports ASGI, so you can integrate it with Quart just fine.
Hey,
Thanks, so I can just use it like it’s Flask, or I need to update something?
@ICExFS what do you mean, just like it's Flask? If you are wondering about Flask-SocketIO, then the answer is no, that is an extension for Flask, and it does not work with Quart.
What I meant is that python-socketio can coexist with another ASGI application. Take a look at the asgi examples. The ASGIApp
class takes an optional argument for your main ASGI app, and then it can route traffic between the Socket.IO and HTTP sides.
Ah, I through we were speaking about Flask-SocketIO, my bad. Thanks
It looks to me like the Flask-SocketIO is deeply interwoven with eventlet, where as Quart uses the native asyncio library in python. Due to this underlying conflict of dependencies I think you'll have to use something like WebSocket.
@jmarshall9120 This thread is for python-socketio, nothing to do with Flask. Support for ASGI has been implemented long ago, and it can be used with FastAPI, Quart and other ASGI frameworks.
@miguelgrinberg - this topic is the top search result on google for a "quart socketio" search. The gist is that flask-socketio doesn't work. The fact the last poster mentioned Flask-Socketio doesn't help, so I stated the current dependency difference. Its starting to look like to me that socketio does too much "server" stuff to really be useful with quart, instead serving as an alternative.
Good day @miguelgrinberg Please advise how to use python-socketio with Quart I tried to marry them with no luck. Then I raised an issue in Quart project and was advised to find support here.
Best regards, Andrew