{ "info": { "author": "Benno Rice", "author_email": "benno@jeamland.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "Pure Python, pure state-machine WebSocket implementation\n========================================================\n\n.. image:: https://travis-ci.org/python-hyper/wsproto.svg?branch=master\n :target: https://travis-ci.org/python-hyper/wsproto\n :alt: Build status\n.. image:: https://readthedocs.org/projects/wsproto/badge/?version=latest\n :target: http://wsproto.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. image:: https://codecov.io/gh/python-hyper/wsproto/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/python-hyper/wsproto\n :alt: Code coverage\n\nThis repository contains a pure-Python implementation of a WebSocket protocol\nstack. It's written from the ground up to be embeddable in whatever program you\nchoose to use, ensuring that you can communicate via WebSockets, as defined in\n`RFC6455 `_, regardless of your programming\nparadigm.\n\nThis repository does not provide a parsing layer, a network layer, or any rules\nabout concurrency. Instead, it's a purely in-memory solution, defined in terms\nof data actions and WebSocket frames. RFC6455 and Compression Extensions for\nWebSocket via `RFC7692 `_ are fully\nsupported.\n\nwsproto supports Python 3.6.1 or higher.\n\nTo install it, just run:\n\n.. code-block:: console\n\n $ pip install wsproto\n\n\nUsage\n=====\n\nLet's assume you have some form of network socket available. wsproto client\nconnections automatically generate a HTTP request to initiate the WebSocket\nhandshake. To create a WebSocket client connection:\n\n.. code-block:: python\n\n from wsproto import WSConnection, ConnectionType\n from wsproto.events import Request\n\n ws = WSConnection(ConnectionType.CLIENT)\n ws.send(Request(host='echo.websocket.org', target='/'))\n\nTo create a WebSocket server connection:\n\n.. code-block:: python\n\n from wsproto.connection import WSConnection, ConnectionType\n\n ws = WSConnection(ConnectionType.SERVER)\n\nEvery time you send a message, or call a ping, or simply if you receive incoming\ndata, wsproto might respond with some outgoing data that you have to send:\n\n.. code-block:: python\n\n some_socket.send(ws.bytes_to_send())\n\nBoth connection types need to receive incoming data:\n\n.. code-block:: python\n\n ws.receive_data(some_byte_string_of_data)\n\nAnd wsproto will issue events if the data contains any WebSocket messages or state changes:\n\n.. code-block:: python\n\n for event in ws.events():\n if isinstance(event, Request):\n # only client connections get this event\n ws.send(AcceptConnection())\n elif isinstance(event, CloseConnection):\n # guess nobody wants to talk to us any more...\n elif isinstance(event, TextMessage):\n print('We got text!', event.data)\n elif isinstance(event, BytesMessage):\n print('We got bytes!', event.data)\n\nTake a look at our docs for a `full list of events\n`!\n\nTesting\n=======\n\nIt passes the autobahn test suite completely and strictly in both client and\nserver modes and using permessage-deflate.\n\nIf you want to run the compliance tests, go into the compliance directory and\nthen to test client mode, in one shell run the Autobahn test server:\n\n.. code-block:: console\n\n $ wstest -m fuzzingserver -s ws-fuzzingserver.json\n\nAnd in another shell run the test client:\n\n.. code-block:: console\n\n $ python test_client.py\n\nAnd to test server mode, run the test server:\n\n.. code-block:: console\n\n $ python test_server.py\n\nAnd in another shell run the Autobahn test client:\n\n.. code-block:: console\n\n $ wstest -m fuzzingclient -s ws-fuzzingclient.json\n\n\nDocumentation\n=============\n\nDocumentation is available at https://wsproto.readthedocs.io/en/latest/.\n\nContributing\n============\n\n``wsproto`` welcomes contributions from anyone! Unlike many other projects we\nare happy to accept cosmetic contributions and small contributions, in addition\nto large feature requests and changes.\n\nBefore you contribute (either by opening an issue or filing a pull request),\nplease `read the contribution guidelines`_.\n\n.. _read the contribution guidelines: http://python-hyper.org/en/latest/contributing.html\n\nLicense\n=======\n\n``wsproto`` is made available under the MIT License. For more details, see the\n``LICENSE`` file in the repository.\n\nAuthors\n=======\n\n``wsproto`` was created by @jeamland, and is maintained by the python-hyper\ncommunity.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/python-hyper/wsproto/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wsproto", "package_url": "https://pypi.org/project/wsproto/", "platform": "", "project_url": "https://pypi.org/project/wsproto/", "project_urls": { "Homepage": "https://github.com/python-hyper/wsproto/" }, "release_url": "https://pypi.org/project/wsproto/0.15.0/", "requires_dist": [ "h11 (>=0.8.1)", "dataclasses ; python_version < \"3.7\"" ], "requires_python": ">=3.6.1", "summary": "WebSockets state-machine based protocol implementation", "version": "0.15.0" }, "last_serial": 5659379, "releases": { "0.10.0": [ { "comment_text": "", "digests": { "md5": "3bc847b5d82e6f69523bbe5ae515df9b", "sha256": "ccc2a6cbf634cde9386fc349ed8c5836fd5e37f31b03dfc4997e27521c7ecabd" }, "downloads": -1, "filename": "wsproto-0.10.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3bc847b5d82e6f69523bbe5ae515df9b", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 13723, "upload_time": "2017-05-03T19:01:42", "url": "https://files.pythonhosted.org/packages/32/72/38edb8f48373ba0a9c504e8b71d2b24777f610816d6f3a6e8026b2d3bf30/wsproto-0.10.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "60f390782e85976791e686aabba08aef", "sha256": "cc6a990baec0510f926a9287ae23d031a0ba267474a98e485488244f725900ad" }, "downloads": -1, "filename": "wsproto-0.10.0.tar.gz", "has_sig": false, "md5_digest": "60f390782e85976791e686aabba08aef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14644, "upload_time": "2017-05-03T19:00:01", "url": "https://files.pythonhosted.org/packages/04/03/a3441f7ce6ea7be9ccae8fa6e1eedfc4bebf6580eb10b8e433a4347c37bc/wsproto-0.10.0.tar.gz" } ], "0.11.0": [ { "comment_text": "", "digests": { "md5": "207e987d70766a11d52d02cd3f56bc4e", "sha256": "d2a7f718ab3144ec956a3267d57b5c172f0668827f5803e7d670837b0125b9fa" }, "downloads": -1, "filename": "wsproto-0.11.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "207e987d70766a11d52d02cd3f56bc4e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17835, "upload_time": "2017-12-31T17:31:29", "url": "https://files.pythonhosted.org/packages/1f/bf/a4136bd7950c49f18a7d643f962e307cbed93ca115e0634656d88e02c333/wsproto-0.11.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d75d9fe117cad031f3429a4f916d065c", "sha256": "02f214f6bb43cda62a511e2e8f1d5fa4703ed83d376d18d042bd2bbf2e995824" }, "downloads": -1, "filename": "wsproto-0.11.0.tar.gz", "has_sig": true, "md5_digest": "d75d9fe117cad031f3429a4f916d065c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41179, "upload_time": "2017-12-31T17:31:31", "url": "https://files.pythonhosted.org/packages/8a/8e/65017baa6a398f93866c68054ce797aef1a8b10793c94d8653f70e8ad613/wsproto-0.11.0.tar.gz" } ], "0.12.0": [ { "comment_text": "", "digests": { "md5": "493a59ed6382b5c01fac5067d1adf180", "sha256": "6a51cf18d9de612892b9c1d38a8c1bdadec0cfe15de61cd5c0f09174bf0c7e82" }, "downloads": -1, "filename": "wsproto-0.12.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "493a59ed6382b5c01fac5067d1adf180", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21000, "upload_time": "2018-09-23T11:27:49", "url": "https://files.pythonhosted.org/packages/6b/f8/300c85ce7473a6e81c6aef294b6bb55375720e08974cdec915793eafaf58/wsproto-0.12.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b7da6def0513f83e82946241f9800698", "sha256": "1fcb726d448f1b9bcbea884e26621af5ddd01d2d502941a024f4c727828b6009" }, "downloads": -1, "filename": "wsproto-0.12.0.tar.gz", "has_sig": false, "md5_digest": "b7da6def0513f83e82946241f9800698", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45252, "upload_time": "2018-09-23T11:27:50", "url": "https://files.pythonhosted.org/packages/a8/a3/e4b7754da28e302ae521399936d5c17c703277d5cdbd7b813d09297252ec/wsproto-0.12.0.tar.gz" } ], "0.13.0": [ { "comment_text": "", "digests": { "md5": "5876065e0d9e4c4fbd40a383b17dde9a", "sha256": "c013342d7a9180486713c6c986872e4fe24e18a21ccbece314939d8b58312e0e" }, "downloads": -1, "filename": "wsproto-0.13.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5876065e0d9e4c4fbd40a383b17dde9a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 38740, "upload_time": "2019-01-24T09:45:20", "url": "https://files.pythonhosted.org/packages/74/18/92f1c6b570ac322d5cfdc9dd10c6ba863b153a38c664d7bc50df719b5815/wsproto-0.13.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a707ad0aafbfa144a5f7bd3817621611", "sha256": "fd6020d825022247053400306448e161d8740bdd52e328e5553cd9eee089f705" }, "downloads": -1, "filename": "wsproto-0.13.0.tar.gz", "has_sig": false, "md5_digest": "a707ad0aafbfa144a5f7bd3817621611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50758, "upload_time": "2019-01-24T09:45:22", "url": "https://files.pythonhosted.org/packages/38/43/cdb84186bede07de538160583e97a423718e050b912ad5d002e0c3a8b9a8/wsproto-0.13.0.tar.gz" } ], "0.14.0": [ { "comment_text": "", "digests": { "md5": "f44e703cedfc383c967ac092f5510a13", "sha256": "c7f35e0af250b9f25583b090039eb2159a079fbe71b7daf86cc3ddcd2f3a70b3" }, "downloads": -1, "filename": "wsproto-0.14.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f44e703cedfc383c967ac092f5510a13", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 38802, "upload_time": "2019-04-06T18:06:53", "url": "https://files.pythonhosted.org/packages/91/0b/d88cabc62f6c85363a57456d2d064dd50746e02c7637cd780c256295dca3/wsproto-0.14.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c7270a941cb20be0f8354f1c943b8ec", "sha256": "55c3da870460e8838b2fbe4d10f3accc0cea3a13d5e8dbbdc6da5d537d6d44dc" }, "downloads": -1, "filename": "wsproto-0.14.0.tar.gz", "has_sig": false, "md5_digest": "1c7270a941cb20be0f8354f1c943b8ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51540, "upload_time": "2019-04-06T18:06:55", "url": "https://files.pythonhosted.org/packages/2c/57/a31a21cb21a1be6f829d14298aaa3385ae70a36237a94bf361336ac49b32/wsproto-0.14.0.tar.gz" } ], "0.14.1": [ { "comment_text": "", "digests": { "md5": "6acfa1f1e32569c35ca4c4f4153cf821", "sha256": "2b870f5b5b4a6d23dce080a4ee1cbb119b2378f82593bd6d66ae2cbd72a7c0ad" }, "downloads": -1, "filename": "wsproto-0.14.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6acfa1f1e32569c35ca4c4f4153cf821", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24270, "upload_time": "2019-05-30T18:55:23", "url": "https://files.pythonhosted.org/packages/6a/e2/d69646c06cc970393e23e7506cb7ec3cec98e1f54ca5c5fac6efc15f67de/wsproto-0.14.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6421d9e2ddd1597ddc4b9ad2b3d0f040", "sha256": "ed222c812aaea55d72d18a87df429cfd602e15b6c992a07a53b495858f083a14" }, "downloads": -1, "filename": "wsproto-0.14.1.tar.gz", "has_sig": false, "md5_digest": "6421d9e2ddd1597ddc4b9ad2b3d0f040", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51640, "upload_time": "2019-05-30T18:55:24", "url": "https://files.pythonhosted.org/packages/44/38/bdbbefd2b787016b1386ad6f4b92bfe2653e2a72a3038d25784ac187be46/wsproto-0.14.1.tar.gz" } ], "0.15.0": [ { "comment_text": "", "digests": { "md5": "702c09135c3cf22de93e358d64760b7e", "sha256": "e3d190a11d9307112ba23bbe60055604949b172143969c8f641318476a9b6f1d" }, "downloads": -1, "filename": "wsproto-0.15.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "702c09135c3cf22de93e358d64760b7e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.1", "size": 24005, "upload_time": "2019-08-10T12:31:27", "url": "https://files.pythonhosted.org/packages/d5/8b/96575a9a73591ce8e5e519375e30565bf9d299d0ced98a2970c225abedf4/wsproto-0.15.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d85f66da7ca9945b8bbfb8134900057", "sha256": "614798c30e5dc2b3f65acc03d2d50842b97621487350ce79a80a711229edfa9d" }, "downloads": -1, "filename": "wsproto-0.15.0.tar.gz", "has_sig": false, "md5_digest": "7d85f66da7ca9945b8bbfb8134900057", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.1", "size": 51765, "upload_time": "2019-08-10T12:31:29", "url": "https://files.pythonhosted.org/packages/7b/5c/7b125c14fbdbeb7913d61e5841e20a453d71d5a5d961354a384c3ceeb81c/wsproto-0.15.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "ea3f71d1f4ea55220416f1728fd5924e", "sha256": "682d35f78d7176901c907432dd11efe9992db660d77fba90e4f9c549fb93ec66" }, "downloads": -1, "filename": "wsproto-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea3f71d1f4ea55220416f1728fd5924e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10802, "upload_time": "2016-08-24T22:00:18", "url": "https://files.pythonhosted.org/packages/5f/c0/adb7c4fad32c2f8f1b8b058197a0e110a6bf369cf2c5414bc5f0913e2761/wsproto-0.9.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "32847904c0d02b6b8e6cf41f9ea5a568", "sha256": "3f1922176051bb2ef57a515eb8ff5e0f35e21871aae636bd73e9f64610c48545" }, "downloads": -1, "filename": "wsproto-0.9.0.tar.gz", "has_sig": false, "md5_digest": "32847904c0d02b6b8e6cf41f9ea5a568", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9614, "upload_time": "2016-08-24T22:01:16", "url": "https://files.pythonhosted.org/packages/8b/75/123b82515cfb42f2c173932deb33aacd5f58ad05c48c4be4743dd5116eb6/wsproto-0.9.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "702c09135c3cf22de93e358d64760b7e", "sha256": "e3d190a11d9307112ba23bbe60055604949b172143969c8f641318476a9b6f1d" }, "downloads": -1, "filename": "wsproto-0.15.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "702c09135c3cf22de93e358d64760b7e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.1", "size": 24005, "upload_time": "2019-08-10T12:31:27", "url": "https://files.pythonhosted.org/packages/d5/8b/96575a9a73591ce8e5e519375e30565bf9d299d0ced98a2970c225abedf4/wsproto-0.15.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d85f66da7ca9945b8bbfb8134900057", "sha256": "614798c30e5dc2b3f65acc03d2d50842b97621487350ce79a80a711229edfa9d" }, "downloads": -1, "filename": "wsproto-0.15.0.tar.gz", "has_sig": false, "md5_digest": "7d85f66da7ca9945b8bbfb8134900057", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.1", "size": 51765, "upload_time": "2019-08-10T12:31:29", "url": "https://files.pythonhosted.org/packages/7b/5c/7b125c14fbdbeb7913d61e5841e20a453d71d5a5d961354a384c3ceeb81c/wsproto-0.15.0.tar.gz" } ] }