{ "info": { "author": "Will McGugan", "author_email": "will.mcgugan@wildfoundry.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "============================\ndataplicity-websocket-client\n============================\n\nThis is a fork of https://github.com/websocket-client/websocket-client \n\nIt contains a hot-fix for an issue with secure websockets. Unless you need that fix, you probably want the official release (https://pypi.python.org/pypi/websocket-client/0.40.0)\n\n\n=================\nwebsocket-client\n=================\n\n**Our repository has moved to https://github.com/websocket-client/websocket-client**\n\nwebsocket-client module is WebSocket client for python. This provide the low level APIs for WebSocket. All APIs are the synchronous functions.\n\nwebsocket-client supports only hybi-13.\n\n\nLicense\n============\n\n - LGPL\n\nInstallation\n=============\n\nThis module is tested on Python 2.7 and Python 3.x.\n\nType \"python setup.py install\" or \"pip install websocket-client\" to install.\n\n.. CAUTION::\n\n from v0.16.0, we can install by \"pip install websocket-client\" for python 3.\n\nThis module depend on\n\n - six\n - backports.ssl_match_hostname for Python 2.x\n\nHow about Python 3\n===========================\n\nNow, we support python 3 on single source code from version 0.14.0. Thanks, @battlemidget and @ralphbean.\n\nHTTP Proxy\n=============\n\nSupport websocket access via http proxy.\nThe proxy server must allow \"CONNECT\" method to websocket port.\nDefault squid setting is \"ALLOWED TO CONNECT ONLY HTTPS PORT\".\n\nCurrent implementation of websocket-client is using \"CONNECT\" method via proxy.\n\n\nexample\n\n.. code:: python\n\n import websocket\n ws = websocket.WebSocket()\n ws.connect(\"ws://example.com/websocket\", http_proxy_host=\"proxy_host_name\", http_proxy_port=3128)\n :\n\n\n\nExamples\n========\n\nLong-lived connection\n---------------------\nThis example is similar to how WebSocket code looks in browsers using JavaScript.\n\n.. code:: python\n\n import websocket\n import thread\n import time\n\n def on_message(ws, message):\n print message\n\n def on_error(ws, error):\n print error\n\n def on_close(ws):\n print \"### closed ###\"\n\n def on_open(ws):\n def run(*args):\n for i in range(3):\n time.sleep(1)\n ws.send(\"Hello %d\" % i)\n time.sleep(1)\n ws.close()\n print \"thread terminating...\"\n thread.start_new_thread(run, ())\n\n\n if __name__ == \"__main__\":\n websocket.enableTrace(True)\n ws = websocket.WebSocketApp(\"ws://echo.websocket.org/\",\n on_message = on_message,\n on_error = on_error,\n on_close = on_close)\n ws.on_open = on_open\n ws.run_forever()\n\n\nShort-lived one-off send-receive\n--------------------------------\nThis is if you want to communicate a short message and disconnect immediately when done.\n\n.. code:: python\n\n from websocket import create_connection\n ws = create_connection(\"ws://echo.websocket.org/\")\n print \"Sending 'Hello, World'...\"\n ws.send(\"Hello, World\")\n print \"Sent\"\n print \"Receiving...\"\n result = ws.recv()\n print \"Received '%s'\" % result\n ws.close()\n\nIf you want to customize socket options, set sockopt.\n\nsockopt example\n\n.. code:: python\n\n from websocket import create_connection\n ws = create_connection(\"ws://echo.websocket.org/\",\n sockopt=((socket.IPPROTO_TCP, socket.TCP_NODELAY),))\n\n\nMore advanced: Custom class\n---------------------------\nYou can also write your own class for the connection, if you want to handle the nitty-gritty details yourself.\n\n.. code:: python\n\n from websocket import create_connection, WebSocket\n class MyWebSocket(WebSocket):\n def recv_frame(self):\n frame = super().recv_frame()\n print('yay! I got this frame: ', frame)\n return frame\n\n ws = create_connection(\"ws://echo.websocket.org/\",\n sockopt=((socket.IPPROTO_TCP, socket.TCP_NODELAY),), class_=MyWebSocket)\n\n\nFAQ\n============\n\nHow to disable ssl cert verification?\n----------------------------------------\n\nPlease set sslopt to {\"cert_reqs\": ssl.CERT_NONE}.\n\nWebSocketApp sample\n\n.. code:: python\n\n ws = websocket.WebSocketApp(\"wss://echo.websocket.org\")\n ws.run_forever(sslopt={\"cert_reqs\": ssl.CERT_NONE})\n\ncreate_connection sample\n\n.. code:: python\n\n ws = websocket.create_connection(\"wss://echo.websocket.org\",\n sslopt={\"cert_reqs\": ssl.CERT_NONE})\n\nWebSocket sample\n\n.. code:: python\n\n ws = websocket.WebSocket(sslopt={\"cert_reqs\": ssl.CERT_NONE})\n ws.connect(\"wss://echo.websocket.org\")\n\n\nHow to disable hostname verification.\n----------------------------------------\n\nPlease set sslopt to {\"check_hostname\": False}.\n(since v0.18.0)\n\nWebSocketApp sample\n\n.. code:: python\n\n ws = websocket.WebSocketApp(\"wss://echo.websocket.org\")\n ws.run_forever(sslopt={\"check_hostname\": False})\n\ncreate_connection sample\n\n.. code:: python\n\n ws = websocket.create_connection(\"wss://echo.websocket.org\",\n sslopt={\"check_hostname\": False})\n\nWebSocket sample\n\n.. code:: python\n\n ws = websocket.WebSocket(sslopt={\"check_hostname\": False})\n ws.connect(\"wss://echo.websocket.org\")\n\n\nHow to enable `SNI `_?\n---------------------------------------------------------------------------\n\nSNI support is available for Python 2.7.9+ and 3.2+. It will be enabled automatically whenever possible.\n\n\nSub Protocols.\n----------------------------------------\n\nThe server needs to support sub protocols, please set the subprotocol like this.\n\n\nSubprotocol sample\n\n.. code:: python\n\n ws = websocket.create_connection(\"ws://exapmle.com/websocket\", subprotocols=[\"binary\", \"base64\"])\n\n\n\nwsdump.py\n============\n\nwsdump.py is simple WebSocket test(debug) tool.\n\nsample for echo.websocket.org::\n\n $ wsdump.py ws://echo.websocket.org/\n Press Ctrl+C to quit\n > Hello, WebSocket\n < Hello, WebSocket\n > How are you?\n < How are you?\n\nUsage\n---------\n\nusage::\n\n wsdump.py [-h] [-v [VERBOSE]] ws_url\n\nWebSocket Simple Dump Tool\n\npositional arguments:\n ws_url websocket url. ex. ws://echo.websocket.org/\n\noptional arguments:\n -h, --help show this help message and exit\nWebSocketApp\n -v VERBOSE, --verbose VERBOSE set verbose mode. If set to 1, show opcode. If set to 2, enable to trace websocket module\n\nexample::\n\n $ wsdump.py ws://echo.websocket.org/\n $ wsdump.py ws://echo.websocket.org/ -v\n $ wsdump.py ws://echo.websocket.org/ -vv", "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/websocket-client/websocket-client.git", "keywords": "websockets", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "dataplicity_websocket_client", "package_url": "https://pypi.org/project/dataplicity_websocket_client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dataplicity_websocket_client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/websocket-client/websocket-client.git" }, "release_url": "https://pypi.org/project/dataplicity_websocket_client/0.41.0/", "requires_dist": null, "requires_python": null, "summary": "WebSocket client for python. hybi13 is supported.", "version": "0.41.0" }, "last_serial": 2599489, "releases": { "0.41.0": [ { "comment_text": "", "digests": { "md5": "63ce751b5a78a833a4749a577102b52a", "sha256": "71e6ca05ba61b1d8eba28cba1eea520ba14e5773dbbbffee5007ab60013a48a5" }, "downloads": -1, "filename": "dataplicity_websocket_client-0.41.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63ce751b5a78a833a4749a577102b52a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 199040, "upload_time": "2017-01-26T11:35:09", "url": "https://files.pythonhosted.org/packages/ed/94/3a0a84d0579be94e4f62d1fcf630f3fe42557935d59579d10d0073d3010d/dataplicity_websocket_client-0.41.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b15a91ae9d6b855b635dab4245cadbf1", "sha256": "ea757288e9870a97cba503226d120443c69d5dff741727dc412e7a33e44cc668" }, "downloads": -1, "filename": "dataplicity_websocket_client-0.41.0.tar.gz", "has_sig": false, "md5_digest": "b15a91ae9d6b855b635dab4245cadbf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191639, "upload_time": "2017-01-26T11:35:06", "url": "https://files.pythonhosted.org/packages/2a/80/9cd55770a9981ce2f30bfa5f1c5862db744a3f3901cad75948b6f34af3e3/dataplicity_websocket_client-0.41.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63ce751b5a78a833a4749a577102b52a", "sha256": "71e6ca05ba61b1d8eba28cba1eea520ba14e5773dbbbffee5007ab60013a48a5" }, "downloads": -1, "filename": "dataplicity_websocket_client-0.41.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63ce751b5a78a833a4749a577102b52a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 199040, "upload_time": "2017-01-26T11:35:09", "url": "https://files.pythonhosted.org/packages/ed/94/3a0a84d0579be94e4f62d1fcf630f3fe42557935d59579d10d0073d3010d/dataplicity_websocket_client-0.41.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b15a91ae9d6b855b635dab4245cadbf1", "sha256": "ea757288e9870a97cba503226d120443c69d5dff741727dc412e7a33e44cc668" }, "downloads": -1, "filename": "dataplicity_websocket_client-0.41.0.tar.gz", "has_sig": false, "md5_digest": "b15a91ae9d6b855b635dab4245cadbf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 191639, "upload_time": "2017-01-26T11:35:06", "url": "https://files.pythonhosted.org/packages/2a/80/9cd55770a9981ce2f30bfa5f1c5862db744a3f3901cad75948b6f34af3e3/dataplicity_websocket_client-0.41.0.tar.gz" } ] }