{ "info": { "author": "cime", "author_email": "cime@specialec.net", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent" ], "description": "Bottle Tornado Websocket\n========================\n\nThis project adds websocket capabilities to [bottle](http://bottlepy.org), leveraging [tornado](http://www.tornadoweb.org/)\n\n### Install\nUse `pip` or `easy_install`:\n\n pip install bottle-tornado-websocket\n\n### Requirements\n\n* Bottle\n* Tornado\n\n### Usage\nImport the server and tornado's WebSocketHandler:\n\n from bottle.ext.tornadosocket import TornadoWebSocketServer\n from tornado.websocket import WebSocketHandler\n\nCreate your application handlers, for example:\n\n class EchoWebSocket(tornado.websocket.WebSocketHandler):\n def open(self):\n print 'Connected')\n\n def on_message(self, message):\n self.write(message)\n\n def on_close(self):\n print 'Connection closed')\n\nMap handlers to urls:\n\n tornado_handlers = [\n (r\"/echo\", EchoWebSocket)\n ]\n\nNote: the `.*` is automatically mapped as a last handler to your normal bottle application\n\nAnd then use the provided server:\n\n run(port=8080, server=TornadoWebSocketServer, handlers=tornado_handlers)\n\n### Example\nTo echo chat example just run `chat.py` in `examples/echo` folder:\n\n python echo.py\n\nTo run chat example just run `chat.py` in `examples/chat` folder:\n\n python chat.py", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cime/bottle-tornadosocket", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "bottle-tornadosocket", "package_url": "https://pypi.org/project/bottle-tornadosocket/", "platform": "any", "project_url": "https://pypi.org/project/bottle-tornadosocket/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/cime/bottle-tornadosocket" }, "release_url": "https://pypi.org/project/bottle-tornadosocket/0.13/", "requires_dist": null, "requires_python": null, "summary": "WebSockets for bottle", "version": "0.13" }, "last_serial": 787009, "releases": { "0.13": [ { "comment_text": "", "digests": { "md5": "f7c957b7955188f8be00b88767491f7f", "sha256": "77b5953bdcf9e6931a90538ee018da5f592a84f8b7fc6f852c441a5230a0072b" }, "downloads": -1, "filename": "bottle-tornadosocket-0.13.zip", "has_sig": false, "md5_digest": "f7c957b7955188f8be00b88767491f7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5277, "upload_time": "2012-04-26T23:32:09", "url": "https://files.pythonhosted.org/packages/29/69/1cbe0cca44075b37da92e02e27f0edb77d74b612d565f92f7c35a9c5c80b/bottle-tornadosocket-0.13.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f7c957b7955188f8be00b88767491f7f", "sha256": "77b5953bdcf9e6931a90538ee018da5f592a84f8b7fc6f852c441a5230a0072b" }, "downloads": -1, "filename": "bottle-tornadosocket-0.13.zip", "has_sig": false, "md5_digest": "f7c957b7955188f8be00b88767491f7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5277, "upload_time": "2012-04-26T23:32:09", "url": "https://files.pythonhosted.org/packages/29/69/1cbe0cca44075b37da92e02e27f0edb77d74b612d565f92f7c35a9c5c80b/bottle-tornadosocket-0.13.zip" } ] }