Hi all, I recently pushed a new version of ws4py, a WebSocket client/server library for Python 2.x. == Overview == ws4py implements version 8 of draft-10 of the WebSocket specification. It supports CherryPy 3.2.1 and gevent as WebSocket servers. Tornado already ships supports for a WebSocket server. Client support comes for Tornado and a a threaded implementation only relying on Python stdlib. It heavily relies on generators using both .next() and .send(bytes) to decouple data provider from the actual WebSocket protocol implementation which makes it quite easy to port to other providers if need be (Kamaelia, circuits come to mind). The servers work fine against a Chrome 15. It hasn't been tested against other browsers. ws4py does run on Android devices via the SL4A package. == Get it == ws4py is a pure Python package and can be installed from PyPI: http://pypi.python.org/pypi/ws4py/0.1.2 Its repository is hosted on github: https://github.com/Lawouach/WebSocket-for-Python == Functional Test results == Some test results, using the Autobahn test suite: http://www.defuze.org/oss/ws4py/testreports/servers/ http://www.tavendo.de/autobahn Those tests show that for large messages, ws4py might not be yet tuned enough. This will be addressed in a near future release. == Examples == A daft in-browser chat example: https://github.com/Lawouach/WebSocket-for-Python/blob/master/example/echo_ch... An Android based demo that displays the device sensors in real-time in a HTML5 canvas: https://github.com/Lawouach/WebSocket-for-Python/tree/master/example http://www.defuze.org/oss/ws4py/screenshots/droidsensors.png == Acknowledgments == Jeff Lindsay for the gevent server implementation. https://github.com/progrium pywebsocket and Tornado for their implementations that were a fantastic starting point. Have fun, -- - Sylvain http://www.defuze.org http://twitter.com/lawouach
participants (1)
-
Sylvain Hellegouarch