summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/third_party/websockets/docs/index.rst
blob: 1b2f85f0a4f24f28c28427249530707ecbe0e3d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
websockets
==========

|pypi-v| |pypi-pyversions| |pypi-l| |pypi-wheel| |circleci| |codecov|

.. |pypi-v| image:: https://img.shields.io/pypi/v/websockets.svg
    :target: https://pypi.python.org/pypi/websockets

.. |pypi-pyversions| image:: https://img.shields.io/pypi/pyversions/websockets.svg
    :target: https://pypi.python.org/pypi/websockets

.. |pypi-l| image:: https://img.shields.io/pypi/l/websockets.svg
    :target: https://pypi.python.org/pypi/websockets

.. |pypi-wheel| image:: https://img.shields.io/pypi/wheel/websockets.svg
    :target: https://pypi.python.org/pypi/websockets

.. |circleci| image:: https://img.shields.io/circleci/project/github/aaugustin/websockets.svg
   :target: https://circleci.com/gh/aaugustin/websockets

.. |codecov| image:: https://codecov.io/gh/aaugustin/websockets/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/aaugustin/websockets

``websockets`` is a library for building WebSocket servers_ and clients_ in
Python with a focus on correctness and simplicity.

.. _servers: https://github.com/aaugustin/websockets/blob/master/example/server.py
.. _clients: https://github.com/aaugustin/websockets/blob/master/example/client.py

Built on top of :mod:`asyncio`, Python's standard asynchronous I/O framework,
it provides an elegant coroutine-based API.

Here's how a client sends and receives messages:

.. literalinclude:: ../example/hello.py

And here's an echo server:

.. literalinclude:: ../example/echo.py

Do you like it? Let's dive in!

Tutorials
---------

If you're new to ``websockets``, this is the place to start.

.. toctree::
   :maxdepth: 2

   intro
   faq

How-to guides
-------------

These guides will help you build and deploy a ``websockets`` application.

.. toctree::
   :maxdepth: 2

   cheatsheet
   deployment
   extensions

Reference
---------

Find all the details you could ask for, and then some.

.. toctree::
   :maxdepth: 2

   api

Discussions
-----------

Get a deeper understanding of how ``websockets`` is built and why.

.. toctree::
   :maxdepth: 2

   design
   limitations
   security

Project
-------

This is about websockets-the-project rather than websockets-the-software.

.. toctree::
   :maxdepth: 2

   changelog
   contributing
   license
   For enterprise <tidelift>