{ "info": { "author": "Serge S. Koval", "author_email": "serge.koval@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: CPython" ], "description": "SockJS-tornado server\n=====================\n\nSockJS-tornado is a Python server side counterpart of `SockJS-client browser library `_\nrunning on top of `Tornado `_ framework.\n\nSimplified echo SockJS server could look more or less like::\n\n from tornado import web, ioloop\n from sockjs.tornado import SockJSRouter, SockJSConnection\n\n class EchoConnection(SockJSConnection):\n def on_message(self, msg):\n self.send(msg)\n\n if __name__ == '__main__':\n EchoRouter = SockJSRouter(EchoConnection, '/echo')\n\n app = web.Application(EchoRouter.urls)\n app.listen(9999)\n ioloop.IOLoop.instance().start()\n\n(Take look at `examples `_ for a complete version).\n\nSubscribe to `SockJS mailing list `_ for discussions and support.\n\nSockJS-tornado API\n------------------\n\nSockJS provides slightly different API than ``tornado.websocket``. Main differences are:\n\n1. Depending on transport, actual client connection might or might not be there. So, there is no _self.request_ and\n other ``tornado.web.RequestHandler`` properties.\n2. Changed ``open`` callback name to ``on_open`` to be more consistent with other callbacks.\n3. Instead of ``write_message``, all messages are sent using ``send`` method. Just in case, ``send`` in ``tornado.web.RequestHandler``\n sends raw data over the connection, without encoding it.\n4. There is handy ``broadcast`` function, which accepts list (or iterator) of clients and message to send.\n\nSettings\n--------\n\nYou can pass various settings to the ``SockJSRouter``, in a dictionary::\n\n MyRouter = SockJSRouter(MyConnection, '/my', dict(disabled_transports=['websocket']))\n\nDeployment\n----------\n\nsockjs-tornado properly works behind haproxy and it is recommended deployment approach.\n\nSample configuration file can be found `here `_.\n\nIf your log is full of \"WARNING: Connection closed by the client\", pass ``no_keep_alive`` as ``True`` to ``HTTPServer`` constructor::\n\n HTTPServer(app, no_keep_alive=True).listen(port)\n\nor::\n\n app.listen(port, no_keep_alive=True)\n\n\n\nChangelog\n---------\n\n1.0.1\n~~~~~\n - Tornado 4.x compatibility fix\n\n1.0.0\n~~~~~\n - Major version bump. sockjs-tornado can be considered mature\n - Python 3 support\n - Tornado 3.0 support on both Python 2 and Python 3\n - Bug fixes\n\n\n0.0.5\n~~~~~\n - iOS 6 support\n - SockJS 0.3.3 client support\n - Some headers and request URI path is now passed to on_open handler\n - Added binary transport support for raw websocket transport\n - Minor multiplex sample fixes\n\n0.0.4\n~~~~~\n\n - Added support for older simplejson library versions\n - Fixed installation script\n\n0.0.3\n~~~~~\n\n - SockJS 0.3 support\n - Connection multiplexing sample\n - IP validation is now optional\n\n0.0.2\n~~~~~\n\n - SockJS 0.2 support and compatibility fixes\n\n0.0.1\n~~~~~\n\nInitial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mrjoes/sockjs-tornado/", "keywords": null, "license": "Copyright (C) 2011 Serge S. Koval\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "sockjs-tornado-meiqia", "package_url": "https://pypi.org/project/sockjs-tornado-meiqia/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sockjs-tornado-meiqia/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mrjoes/sockjs-tornado/" }, "release_url": "https://pypi.org/project/sockjs-tornado-meiqia/2016.12.30/", "requires_dist": null, "requires_python": null, "summary": "SockJS python server implementation on top of Tornado framework", "version": "2016.12.30" }, "last_serial": 2545362, "releases": { "2016.11.3": [ { "comment_text": "", "digests": { "md5": "3832510ba3dd3efb675c8559262b2775", "sha256": "1538deedba075f790dc6cbc897d1b6a16a39a7739eb3c801a0def3b9098b5fc6" }, "downloads": -1, "filename": "sockjs-tornado-meiqia-2016.11.3.tar.gz", "has_sig": false, "md5_digest": "3832510ba3dd3efb675c8559262b2775", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21597, "upload_time": "2016-11-16T13:44:59", "url": "https://files.pythonhosted.org/packages/54/11/2e1ae7b6c09b8eb616c90f90889bc8389b442d3959f0155eb21e0c9734e8/sockjs-tornado-meiqia-2016.11.3.tar.gz" } ], "2016.12.30": [ { "comment_text": "", "digests": { "md5": "05cf4ad2ab9ed4ea7f086d2dc9906ff8", "sha256": "d324c5711a16e1286848fd64210d371fa7c34191a2e582ab4cd67512764a4bec" }, "downloads": -1, "filename": "sockjs_tornado_meiqia-2016.12.30-py2-none-any.whl", "has_sig": false, "md5_digest": "05cf4ad2ab9ed4ea7f086d2dc9906ff8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34251, "upload_time": "2016-12-30T04:14:38", "url": "https://files.pythonhosted.org/packages/4e/89/c3ad2715403c1b8f9439dba18048d2cafdb304de2bbcb54b8c0c4f9e56d0/sockjs_tornado_meiqia-2016.12.30-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4cbc601ac3de0bdaf1164851800103d4", "sha256": "1a682107da44de4d3dc50a0866a519104a60b37cd6fbec2bd8f7ab07b0de7f47" }, "downloads": -1, "filename": "sockjs-tornado-meiqia-2016.12.30.tar.gz", "has_sig": false, "md5_digest": "4cbc601ac3de0bdaf1164851800103d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21662, "upload_time": "2016-12-30T04:14:34", "url": "https://files.pythonhosted.org/packages/ae/40/eabaf8994e4b4853eaff96c0201c86d7537575204ce4a33d83876d6d8116/sockjs-tornado-meiqia-2016.12.30.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "05cf4ad2ab9ed4ea7f086d2dc9906ff8", "sha256": "d324c5711a16e1286848fd64210d371fa7c34191a2e582ab4cd67512764a4bec" }, "downloads": -1, "filename": "sockjs_tornado_meiqia-2016.12.30-py2-none-any.whl", "has_sig": false, "md5_digest": "05cf4ad2ab9ed4ea7f086d2dc9906ff8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 34251, "upload_time": "2016-12-30T04:14:38", "url": "https://files.pythonhosted.org/packages/4e/89/c3ad2715403c1b8f9439dba18048d2cafdb304de2bbcb54b8c0c4f9e56d0/sockjs_tornado_meiqia-2016.12.30-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4cbc601ac3de0bdaf1164851800103d4", "sha256": "1a682107da44de4d3dc50a0866a519104a60b37cd6fbec2bd8f7ab07b0de7f47" }, "downloads": -1, "filename": "sockjs-tornado-meiqia-2016.12.30.tar.gz", "has_sig": false, "md5_digest": "4cbc601ac3de0bdaf1164851800103d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21662, "upload_time": "2016-12-30T04:14:34", "url": "https://files.pythonhosted.org/packages/ae/40/eabaf8994e4b4853eaff96c0201c86d7537575204ce4a33d83876d6d8116/sockjs-tornado-meiqia-2016.12.30.tar.gz" } ] }