| 1 |
.. Trio documentation master file, created by |
| 2 |
sphinx-quickstart on Sat Jan 21 19:11:14 2017. |
| 3 |
You can adapt this file completely to your liking, but it should at least |
| 4 |
contain the root `toctree` directive. |
| 5 |
|
| 6 |
============================================================= |
| 7 |
Trio: a friendly Python library for async concurrency and I/O |
| 8 |
============================================================= |
| 9 |
|
| 10 |
The Trio project's goal is to produce a production-quality, |
| 11 |
`permissively licensed |
| 12 |
<https://github.com/python-trio/trio/blob/main/LICENSE>`__, |
| 13 |
async/await-native I/O library for Python. Like all async libraries, |
| 14 |
its main purpose is to help you write programs that do **multiple |
| 15 |
things at the same time** with **parallelized I/O**. A web spider that |
| 16 |
wants to fetch lots of pages in parallel, a web server that needs to |
| 17 |
juggle lots of downloads and websocket connections at the same time, a |
| 18 |
process supervisor monitoring multiple subprocesses... that sort of |
| 19 |
thing. Compared to other libraries, Trio attempts to distinguish |
| 20 |
itself with an obsessive focus on **usability** and |
| 21 |
**correctness**. Concurrency is complicated; we try to make it *easy* |
| 22 |
to get things *right*. |
| 23 |
|
| 24 |
Trio was built from the ground up to take advantage of the `latest |
| 25 |
Python features <https://www.python.org/dev/peps/pep-0492/>`__, and |
| 26 |
draws inspiration from `many sources |
| 27 |
<https://github.com/python-trio/trio/wiki/Reading-list>`__, in |
| 28 |
particular Dave Beazley's `Curio <https://curio.readthedocs.io/>`__. |
| 29 |
The resulting design is radically simpler than older competitors like |
| 30 |
`asyncio <https://docs.python.org/3/library/asyncio.html>`__ and |
| 31 |
`Twisted <https://twistedmatrix.com/>`__, yet just as capable. Trio is |
| 32 |
the Python I/O library I always wanted; I find it makes building |
| 33 |
I/O-oriented programs easier, less error-prone, and just plain more |
| 34 |
fun. Perhaps you'll find the same. |
| 35 |
|
| 36 |
Trio is a mature and well-tested library, though it retains its |
| 37 |
“experimental” classification to allow for occasional breaking API |
| 38 |
changes as we push toward a 1.0 release. In practice, such changes are |
| 39 |
rare and typically minor. It is widely used in production environments, |
| 40 |
and we *do* encourage you do use it, but consider `subscribing to issue |
| 41 |
#1 <https://github.com/python-trio/trio/issues/1>`__ to get a warning |
| 42 |
and a chance to give feedback about any compatibility-breaking changes. |
| 43 |
|
| 44 |
Vital statistics: |
| 45 |
|
| 46 |
* Supported environments: We test on |
| 47 |
|
| 48 |
- Python: 3.10+ (CPython and PyPy) |
| 49 |
- Windows, macOS, Linux (glibc and musl), FreeBSD |
| 50 |
|
| 51 |
Other environments might also work; give it a try and see. |
| 52 |
|
| 53 |
* Install: ``python3 -m pip install -U trio`` (or on Windows, maybe |
| 54 |
``py -3 -m pip install -U trio``). No compiler needed. |
| 55 |
|
| 56 |
* Tutorial and reference manual: https://trio.readthedocs.io |
| 57 |
|
| 58 |
* Bug tracker and source code: https://github.com/python-trio/trio |
| 59 |
|
| 60 |
* Real-time chat: https://gitter.im/python-trio/general |
| 61 |
|
| 62 |
* Discussion forum: https://trio.discourse.group |
| 63 |
|
| 64 |
* License: MIT or Apache 2, your choice |
| 65 |
|
| 66 |
* Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html |
| 67 |
|
| 68 |
* Code of conduct: Contributors are requested to follow our `code of |
| 69 |
conduct |
| 70 |
<https://trio.readthedocs.io/en/latest/code-of-conduct.html>`_ |
| 71 |
in all project spaces. |
| 72 |
|
| 73 |
|
| 74 |
.. toctree:: |
| 75 |
:maxdepth: 2 |
| 76 |
:caption: Trio's friendly, yet comprehensive, manual: |
| 77 |
|
| 78 |
tutorial.rst |
| 79 |
awesome-trio-libraries.rst |
| 80 |
reference-core.rst |
| 81 |
reference-io.rst |
| 82 |
reference-testing.rst |
| 83 |
reference-lowlevel.rst |
| 84 |
design.rst |
| 85 |
history.rst |
| 86 |
contributing.rst |
| 87 |
releasing.rst |
| 88 |
code-of-conduct.rst |
| 89 |
|
| 90 |
.. once https://github.com/sphinx-doc/sphinx/issues/13733 is merged, add `genindex` above |
| 91 |
|
| 92 |
==================== |
| 93 |
Indices and tables |
| 94 |
==================== |
| 95 |
|
| 96 |
* :ref:`genindex` |
| 97 |
* :ref:`modindex` |
| 98 |
* :ref:`search` |
| 99 |
* :ref:`glossary` |