Skip to content

Commit 3c62503

Browse files
committed
Use entrypoint instead of runpy in docs.
1 parent f4e4345 commit 3c62503

File tree

13 files changed

+27
-28
lines changed

13 files changed

+27
-28
lines changed

docs/deploy/fly.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ name of your Fly app in this command:
130130

131131
.. code-block:: console
132132
133-
$ python -m websockets wss://websockets-echo.fly.dev/
133+
$ websockets wss://websockets-echo.fly.dev/
134134
Connected to wss://websockets-echo.fly.dev/.
135135
>
136136
@@ -152,7 +152,7 @@ with your app:
152152

153153
.. code-block:: console
154154
155-
$ python -m websockets wss://websockets-echo.fly.dev/
155+
$ websockets wss://websockets-echo.fly.dev/
156156
Connected to wss://websockets-echo.fly.dev/.
157157
>
158158
@@ -169,7 +169,7 @@ away).
169169

170170
.. code-block:: console
171171
172-
$ python -m websockets wss://websockets-echo.fly.dev/
172+
$ websockets wss://websockets-echo.fly.dev/
173173
Connected to wss://websockets-echo.fly.dev/.
174174
Connection closed: 1001 (going away).
175175

docs/deploy/haproxy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ You can confirm that HAProxy proxies connections properly:
5454

5555
.. code-block:: console
5656
57-
$ PYTHONPATH=src python -m websockets ws://localhost:8080/
57+
$ PYTHONPATH=src websockets ws://localhost:8080/
5858
Connected to ws://localhost:8080/.
5959
> Hello!
6060
< Hello!

docs/deploy/heroku.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ name of your Heroku app in this command:
134134

135135
.. code-block:: console
136136
137-
$ python -m websockets wss://websockets-echo.herokuapp.com/
137+
$ websockets wss://websockets-echo.herokuapp.com/
138138
Connected to wss://websockets-echo.herokuapp.com/.
139139
>
140140
@@ -156,7 +156,7 @@ with your app:
156156

157157
.. code-block:: console
158158
159-
$ python -m websockets wss://websockets-echo.herokuapp.com/
159+
$ websockets wss://websockets-echo.herokuapp.com/
160160
Connected to wss://websockets-echo.herokuapp.com/.
161161
>
162162
@@ -173,7 +173,7 @@ away).
173173

174174
.. code-block:: console
175175
176-
$ python -m websockets wss://websockets-echo.herokuapp.com/
176+
$ websockets wss://websockets-echo.herokuapp.com/
177177
Connected to wss://websockets-echo.herokuapp.com/.
178178
Connection closed: 1001 (going away).
179179

docs/deploy/koyeb.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ interactive client — you must replace ``https`` with ``wss`` in the URL:
124124

125125
.. code-block:: console
126126
127-
$ python -m websockets wss://<app>-<user>-<id>.koyeb.app/
127+
$ websockets wss://<app>-<user>-<id>.koyeb.app/
128128
Connected to wss://<app>-<user>-<id>.koyeb.app/.
129129
>
130130
@@ -145,7 +145,7 @@ Connect an interactive client again:
145145

146146
.. code-block:: console
147147
148-
$ python -m websockets wss://<app>-<user>-<id>.koyeb.app/
148+
$ websockets wss://<app>-<user>-<id>.koyeb.app/
149149
Connected to wss://<app>-<user>-<id>.koyeb.app/.
150150
>
151151
@@ -156,7 +156,7 @@ Eventually, the connection gets closed with code 1001 (going away).
156156

157157
.. code-block:: console
158158
159-
$ python -m websockets wss://<app>-<user>-<id>.koyeb.app/
159+
$ websockets wss://<app>-<user>-<id>.koyeb.app/
160160
Connected to wss://<app>-<user>-<id>.koyeb.app/.
161161
Connection closed: 1001 (going away).
162162

docs/deploy/kubernetes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ to the app and check that it echoes anything you send:
5454

5555
.. code-block:: console
5656
57-
$ python -m websockets ws://localhost:32080/
57+
$ websockets ws://localhost:32080/
5858
Connected to ws://localhost:32080/.
5959
> Hey there!
6060
< Hey there!
@@ -71,7 +71,7 @@ shut down gracefully:
7171

7272
.. code-block:: console
7373
74-
$ python -m websockets ws://localhost:32080/
74+
$ websockets ws://localhost:32080/
7575
Connected to ws://localhost:32080/.
7676
> Hey there!
7777
< Hey there!
@@ -119,7 +119,7 @@ You can connect to the service — press Ctrl-D to exit:
119119

120120
.. code-block:: console
121121
122-
$ python -m websockets ws://localhost:32080/
122+
$ websockets ws://localhost:32080/
123123
Connected to ws://localhost:32080/.
124124
Connection closed: 1000 (OK).
125125

docs/deploy/nginx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You can confirm that nginx proxies connections properly:
7777

7878
.. code-block:: console
7979
80-
$ PYTHONPATH=src python -m websockets ws://localhost:8080/
80+
$ PYTHONPATH=src websockets ws://localhost:8080/
8181
Connected to ws://localhost:8080/.
8282
> Hello!
8383
< Hello!

docs/deploy/render.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ name of your Render app in this command:
129129

130130
.. code-block:: console
131131
132-
$ python -m websockets wss://websockets-echo.onrender.com/
132+
$ websockets wss://websockets-echo.onrender.com/
133133
Connected to wss://websockets-echo.onrender.com/.
134134
>
135135
@@ -153,7 +153,7 @@ with your app:
153153

154154
.. code-block:: console
155155
156-
$ python -m websockets wss://websockets-echo.onrender.com/
156+
$ websockets wss://websockets-echo.onrender.com/
157157
Connected to wss://websockets-echo.onrender.com/.
158158
>
159159
@@ -162,7 +162,7 @@ deployment completes, the connection is closed with code 1001 (going away).
162162

163163
.. code-block:: console
164164
165-
$ python -m websockets wss://websockets-echo.onrender.com/
165+
$ websockets wss://websockets-echo.onrender.com/
166166
Connected to wss://websockets-echo.onrender.com/.
167167
Connection closed: 1001 (going away).
168168

docs/deploy/supervisor.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ press Ctrl-D to exit:
6464

6565
.. code-block:: console
6666
67-
$ python -m websockets ws://localhost:8080/
67+
$ websockets ws://localhost:8080/
6868
Connected to ws://localhost:8080/.
6969
> Hello!
7070
< Hello!
@@ -89,7 +89,7 @@ establish a connection and leave it open:
8989

9090
.. code-block:: console
9191
92-
$ python -m websockets ws://localhost:8080/
92+
$ websockets ws://localhost:8080/
9393
Connected to ws://localhost:8080/.
9494
>
9595
@@ -115,7 +115,7 @@ And you can see that the connection to the app was closed gracefully:
115115

116116
.. code-block:: console
117117
118-
$ python -m websockets ws://localhost:8080/
118+
$ websockets ws://localhost:8080/
119119
Connected to ws://localhost:8080/.
120120
Connection closed: 1001 (going away).
121121
@@ -128,4 +128,3 @@ In a real deployment, you would likely:
128128
* Create a virtualenv dedicated to your application.
129129
* Add ``environment=PATH="path/to/your/virtualenv/bin"`` in the Supervisor
130130
configuration. Then ``python app.py`` runs in that virtualenv.
131-

docs/howto/django.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ prompt:
144144

145145
.. code-block:: console
146146
147-
$ python -m websockets ws://localhost:8888/
147+
$ websockets ws://localhost:8888/
148148
Connected to ws://localhost:8888/
149149
> <your token>
150150
< Hello <your username>!
@@ -157,7 +157,7 @@ closes the connection:
157157

158158
.. code-block:: console
159159
160-
$ python -m websockets ws://localhost:8888/
160+
$ websockets ws://localhost:8888/
161161
Connected to ws://localhost:8888.
162162
> not a token
163163
Connection closed: 1011 (internal error) authentication failed.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Also, websockets provides an interactive client:
8787

8888
.. code-block:: console
8989
90-
$ python -m websockets ws://localhost:8765/
90+
$ websockets ws://localhost:8765/
9191
Connected to ws://localhost:8765/.
9292
> Hello world!
9393
< Hello world!

0 commit comments

Comments
 (0)