The Wayback Machine - https://web.archive.org/web/20181002143946/https://github.com/python-trio/trio
Skip to content
Trio – Pythonic async I/O for humans and snake people 🐍 https://trio.readthedocs.io
Clone or download
Permalink
Failed to load latest commit information.
ci Bump pyparsing from 2.2.1 to 2.2.2 Oct 1, 2018
docs Fixed a typo in tutorial.rst Oct 1, 2018
logo Add logos; various doc updates May 7, 2017
newsfragments Release 0.8 Oct 1, 2018
notes-to-self Updated all references to `time.monotonic` to `time.perf_counter` Sep 27, 2018
trio back to +dev Oct 1, 2018
.coveragerc Attempt to clean up coverage a bit Feb 20, 2017
.gitignore Initial Mypy configuration Sep 9, 2018
.readthedocs.yml [rtd] it works! clean up defunct conda stuff Mar 13, 2017
.style.yapf Bump yapf to 0.24, and re-run with new version Sep 28, 2018
.travis.yml Remove renovate config; add minimal config for dependabot/pyup Sep 28, 2018
CODE_OF_CONDUCT.md Add contributing doc, and switch to WeAllJS code of conduct Dec 5, 2017
CONTRIBUTING.md Add contributing doc, and switch to WeAllJS code of conduct Dec 5, 2017
Jenkinsfile Switch back to Jenkins for MacOS builds Jul 30, 2018
LICENSE add line breaks to LICENSE file Jan 23, 2017
LICENSE.APACHE2 towards some kind of project layout Jan 14, 2017
LICENSE.MIT towards some kind of project layout Jan 14, 2017
MANIFEST.in Include CONTRIBUTING.md in sdists Dec 5, 2017
README.rst Rename MacOS to macOS Aug 23, 2018
appveyor.yml Remove renovate config; add minimal config for dependabot/pyup Sep 28, 2018
check.sh Run flake8 in CI Sep 13, 2018
mypy.ini Initial Mypy configuration Sep 9, 2018
pyproject.toml Configure towncrier to print the text from "misc" entries Apr 9, 2018
setup.py Rename MacOS to macOS Aug 23, 2018
test-requirements.in Bump yapf to 0.24, and re-run with new version Sep 28, 2018
test-requirements.txt Bump jedi from 0.12.1 to 0.13.0 Oct 2, 2018

README.rst

Join chatroom Documentation Status Latest PyPi version Latest conda-forge version Automated test status (Linux and macOS) Automated test status (Windows) Test coverage

Trio – async I/O for humans and snake people

P.S. your API is a user interface – Kenneth Reitz

The Trio project's goal is to produce a production-quality, permissively licensed, async/await-native I/O library for Python. Like all async libraries, its main purpose is to help you write programs that do multiple things at the same time with parallelized I/O. A web spider that wants to fetch lots of pages in parallel, a web server that needs to juggle lots of downloads and websocket connections at the same time, a process supervisor monitoring multiple subprocesses... that sort of thing. Compared to other libraries, Trio attempts to distinguish itself with an obsessive focus on usability and correctness. Concurrency is complicated; we try to make it easy to get things right.

Trio was built from the ground up to take advantage of the latest Python features, and draws inspiration from many sources, in particular Dave Beazley's Curio. The resulting design is radically simpler than older competitors like asyncio and Twisted, yet just as capable. Trio is the Python I/O library I always wanted; I find it makes building I/O-oriented programs easier, less error-prone, and just plain more fun. Perhaps you'll find the same.

This project is young and still somewhat experimental: the overall design is solid and the existing features are fully tested and documented, but you may encounter missing functionality or rough edges. We do encourage you do use it, but you should read and subscribe to issue #1 to get warning and a chance to give feedback about any compatibility-breaking changes.

Where to next?

I want to try it out! Awesome! We have a friendly tutorial to get you started; no prior experience with async coding is required.

Ugh, I don't want to read all that – show me some code! It's a good tutorial, Brent! But if you're impatient, here's a simple concurrency example, an echo client, and an echo server.

Cool, but will it work on my system? Probably! As long as you have some kind of Python 3.5-or-better (CPython or the latest PyPy3 are both fine), and are using Linux, macOS, or Windows, then trio should absolutely work. *BSD and illumos likely work too, but we don't have testing infrastructure for them. All of our dependencies are pure Python, except for CFFI on Windows, and that has wheels available, so installation should be easy.

I tried it but it's not working. Sorry to hear that! You can try asking for help in our chat room, filing a bug, or posting a question on StackOverflow, and we'll do our best to help you out.

Trio is awesome and I want to help make it more awesome! You're the best! There's tons of work to do – filling in missing functionality, building up an ecosystem of trio-using libraries, usability testing (e.g., maybe try teaching yourself or a friend to use trio and make a list of every error message you hit and place where you got confused?), improving the docs, ... check out our guide for contributors!

I don't have any immediate plans to use it, but I love geeking out about I/O library design! That's a little weird? But tbh you'll fit in great around here. Check out our discussion of design choices, reading list, and issues tagged design-discussion.

I want to make sure my company's lawyers won't get angry at me! No worries, trio is permissively licensed under your choice of MIT or Apache 2. See LICENSE for details.

Code of conduct

Contributors are requested to follow our code of conduct in all project spaces.

You can’t perform that action at this time.
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.
Press h to open a hovercard with more details.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.