You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've moved some content from README.md to the docs directory and
also greatly expanded the content. I also noticed that I was unwisely
using an Exception where a ValueError would be better, so I changed
that and its corresponding unit test.
After pushing this, I will set up Read The Docs.

6
7
7
8
# Trio WebSocket
8
9
9
-
This project implements [the WebSocket
10
-
protocol](https://tools.ietf.org/html/rfc6455). It is based on the [wsproto
11
-
project](https://wsproto.readthedocs.io/en/latest/), which is a [Sans-IO](https://sans-io.readthedocs.io/) state machine that implements the majority of
12
-
the WebSocket protocol, including framing, codecs, and events. This library
13
-
implements the I/O using [Trio](https://trio.readthedocs.io/en/latest/).
10
+
This library implements [the WebSocket
11
+
protocol](https://tools.ietf.org/html/rfc6455), striving for safety,
12
+
correctness, and ergonomics. It is based on the [wsproto
13
+
project](https://wsproto.readthedocs.io/en/latest/), which is a
14
+
[Sans-IO](https://sans-io.readthedocs.io/) state machine that implements the
15
+
majority of the WebSocket protocol, including framing, codecs, and events. This
16
+
library handles I/O using [the Trio
17
+
framework](https://trio.readthedocs.io/en/latest/). This library passes the
18
+
[Autobahn Test Suite](https://github.com/crossbario/autobahn-testsuite).
19
+
20
+
This README contains a brief introduction to the project. Full documentation [is
21
+
available here](https://trio-websocket.readthedocs.io).
14
22
15
23
## Installation
16
24
17
-
`trio-websocket`requires Python v3.5 or greater. To install from PyPI:
25
+
This library requires Python 3.5 or greater. To install from PyPI:
18
26
19
27
pip install trio-websocket
20
28
21
-
If you want to help develop `trio-websocket`, clone [the
22
-
repository](https://github.com/hyperiongray/trio-websocket) and run this command
23
-
from the repository root:
24
-
25
-
pip install --editable .[dev]
29
+
## Client Example
26
30
27
-
## Sample client
28
-
29
-
The following example demonstrates opening a WebSocket by URL. The connection
30
-
may also be opened with `open_websocket(…)`, which takes a host, port, and
31
-
resource as arguments.
31
+
This example demonstrates how to open a WebSocket URL:
32
32
33
33
```python
34
34
import trio
@@ -37,25 +37,25 @@ from trio_websocket import open_websocket_url
37
37
38
38
asyncdefmain():
39
39
try:
40
-
asyncwith open_websocket_url('ws://localhost/foo') as ws:
40
+
asyncwith open_websocket_url('wss://localhost/foo') as ws:
0 commit comments