Trio – Pythonic async I/O for humans and snake people 🐍
Clone or download
Zac-HD Merge pull request #666 from Zac-HD/misc
Tell Renovate not to update pinned yapf

Also fixes an SSL attribute lookup
Latest commit 46f4405 Sep 23, 2018
Failed to load latest commit information.
ci Update dependency sphinx to v1.8.1 Sep 22, 2018
docs Tweak v0.7.0 release notes Sep 12, 2018
logo Add logos; various doc updates May 7, 2017
newsfragments Improved newsfragement content and renamed to more appropriate featur… Sep 10, 2018
notes-to-self Rename MacOS to macOS Aug 23, 2018
trio Explicit attribute name Sep 23, 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 Switch yapf to using split_before_first_argument=False Dec 25, 2017
.travis.yml ci: only build renovate PRs once Sep 10, 2018 Add contributing doc, and switch to WeAllJS code of conduct Dec 5, 2017 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 Include in sdists Dec 5, 2017
README.rst Rename MacOS to macOS Aug 23, 2018
appveyor.yml ci: only build renovate PRs once Sep 10, 2018 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
renovate.json Pin YAPF for rennovate too Sep 23, 2018 Rename MacOS to macOS Aug 23, 2018 Pin YAPF for rennovate too Sep 23, 2018
test-requirements.txt Update dependency pytest to v3.8.1 Sep 22, 2018


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.