Debian Codegraph @

README.rst

raw
1 aioquic
2 =======
3
4 .. image:: https://img.shields.io/pypi/l/aioquic.svg
5 :target: https://pypi.python.org/pypi/aioquic
6 :alt: License
7
8 .. image:: https://img.shields.io/pypi/v/aioquic.svg
9 :target: https://pypi.python.org/pypi/aioquic
10 :alt: Version
11
12 .. image:: https://img.shields.io/pypi/pyversions/aioquic.svg
13 :target: https://pypi.python.org/pypi/aioquic
14 :alt: Python versions
15
16 .. image:: https://github.com/aiortc/aioquic/workflows/tests/badge.svg
17 :target: https://github.com/aiortc/aioquic/actions
18 :alt: Tests
19
20 .. image:: https://img.shields.io/codecov/c/github/aiortc/aioquic.svg
21 :target: https://codecov.io/gh/aiortc/aioquic
22 :alt: Coverage
23
24 .. image:: https://readthedocs.org/projects/aioquic/badge/?version=latest
25 :target: https://aioquic.readthedocs.io/
26 :alt: Documentation
27
28 What is ``aioquic``?
29 --------------------
30
31 ``aioquic`` is a library for the QUIC network protocol in Python. It features
32 a minimal TLS 1.3 implementation, a QUIC stack and an HTTP/3 stack.
33
34 ``aioquic`` is used by Python opensource projects such as `dnspython`_,
35 `hypercorn`_, `mitmproxy`_ and the `Web Platform Tests`_ cross-browser test
36 suite. It has also been used extensively in research papers about QUIC.
37
38 To learn more about ``aioquic`` please `read the documentation`_.
39
40 Why should I use ``aioquic``?
41 -----------------------------
42
43 ``aioquic`` has been designed to be embedded into Python client and server
44 libraries wishing to support QUIC and / or HTTP/3. The goal is to provide a
45 common codebase for Python libraries in the hope of avoiding duplicated effort.
46
47 Both the QUIC and the HTTP/3 APIs follow the "bring your own I/O" pattern,
48 leaving actual I/O operations to the API user. This approach has a number of
49 advantages including making the code testable and allowing integration with
50 different concurrency models.
51
52 A lot of effort has gone into writing an extensive test suite for the
53 ``aioquic`` code to ensure best-in-class code quality, and it is regularly
54 `tested for interoperability`_ against other `QUIC implementations`_.
55
56 Features
57 --------
58
59 - minimal TLS 1.3 implementation conforming with `RFC 8446`_
60 - QUIC stack conforming with `RFC 9000`_ (QUIC v1) and `RFC 9369`_ (QUIC v2)
61 * IPv4 and IPv6 support
62 * connection migration and NAT rebinding
63 * logging TLS traffic secrets
64 * logging QUIC events in QLOG format
65 * version negotiation conforming with `RFC 9368`_
66 - HTTP/3 stack conforming with `RFC 9114`_
67 * server push support
68 * WebSocket bootstrapping conforming with `RFC 9220`_
69 * datagram support conforming with `RFC 9297`_
70
71 Installing
72 ----------
73
74 The easiest way to install ``aioquic`` is to run:
75
76 .. code:: bash
77
78 pip install aioquic
79
80 Building from source
81 --------------------
82
83 If there are no wheels for your system or if you wish to build ``aioquic``
84 from source you will need the OpenSSL development headers.
85
86 Linux
87 .....
88
89 On Debian/Ubuntu run:
90
91 .. code-block:: console
92
93 sudo apt install libssl-dev python3-dev
94
95 On Alpine Linux run:
96
97 .. code-block:: console
98
99 sudo apk add openssl-dev python3-dev bsd-compat-headers libffi-dev
100
101 OS X
102 ....
103
104 On OS X run:
105
106 .. code-block:: console
107
108 brew install openssl
109
110 You will need to set some environment variables to link against OpenSSL:
111
112 .. code-block:: console
113
114 export CFLAGS=-I$(brew --prefix openssl)/include
115 export LDFLAGS=-L$(brew --prefix openssl)/lib
116
117 Windows
118 .......
119
120 On Windows the easiest way to install OpenSSL is to use `Chocolatey`_.
121
122 .. code-block:: console
123
124 choco install openssl
125
126 You will need to set some environment variables to link against OpenSSL:
127
128 .. code-block:: console
129
130 $Env:INCLUDE = "C:\Progra~1\OpenSSL\include"
131 $Env:LIB = "C:\Progra~1\OpenSSL\lib"
132
133 Running the examples
134 --------------------
135
136 `aioquic` comes with a number of examples illustrating various QUIC usecases.
137
138 You can browse these examples here: https://github.com/aiortc/aioquic/tree/main/examples
139
140 License
141 -------
142
143 ``aioquic`` is released under the `BSD license`_.
144
145 .. _read the documentation: https://aioquic.readthedocs.io/en/latest/
146 .. _dnspython: https://github.com/rthalley/dnspython
147 .. _hypercorn: https://github.com/pgjones/hypercorn
148 .. _mitmproxy: https://github.com/mitmproxy/mitmproxy
149 .. _Web Platform Tests: https://github.com/web-platform-tests/wpt
150 .. _tested for interoperability: https://interop.seemann.io/
151 .. _QUIC implementations: https://github.com/quicwg/base-drafts/wiki/Implementations
152 .. _cryptography: https://cryptography.io/
153 .. _Chocolatey: https://chocolatey.org/
154 .. _BSD license: https://aioquic.readthedocs.io/en/latest/license.html
155 .. _RFC 8446: https://datatracker.ietf.org/doc/html/rfc8446
156 .. _RFC 9000: https://datatracker.ietf.org/doc/html/rfc9000
157 .. _RFC 9114: https://datatracker.ietf.org/doc/html/rfc9114
158 .. _RFC 9220: https://datatracker.ietf.org/doc/html/rfc9220
159 .. _RFC 9297: https://datatracker.ietf.org/doc/html/rfc9297
160 .. _RFC 9368: https://datatracker.ietf.org/doc/html/rfc9368
161 .. _RFC 9369: https://datatracker.ietf.org/doc/html/rfc9369