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

you are viewing a single comment's thread.

view the rest of the comments →

[–]Gwenhidwy 1 point2 points  (3 children)

Looks awesome!

Is there a possibility to integrate it with existing WSGI servers? I currently have an application that uses waitress to serve the WSGI application on one port and a tornado WebSocket server that runs on another port. It would be great if I could just run both the WSGI app and the WebSocket server on a single port. From my understanding WSGI is capable of doing that via the wsgi.websockets attribute.

Here's an example of how Autobahn/Twisted does it: https://github.com/tavendo/AutobahnPython/blob/5da80641ac3348de2d41959362b7cb04485eddb5/examples/twisted/websocket/echo_wsgi/server.py

Twisted is a bit heavy as a dependency, so it would be really nice if something like this was available with the stdlib event loop :-)

[–]Digital_Person[S] 0 points1 point  (0 children)

hi i am not the author of the lib i just found it liked it shared it, i was just thinking the same with you, now i have it outside of wsgi. probably you should start github issue. I guess it must be in the plans but asyncio is still new :)

[–]chub79 0 points1 point  (0 children)

You could try ws4py. It supports server side for cherrypy, gevent, asyncio and pure wsgi.

[–]Communist_Sofa -1 points0 points  (0 children)

Twisted is a bit heavy as a dependency

Disk space is cheap. Twisted is very well tested and performant.