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.
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.
Contributors are requested to follow our code of conduct in all project spaces.