All Projects → python-trio → Trio

python-trio / Trio

Licence: other
Trio – a friendly Python library for async concurrency and I/O

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Trio

Lightio
LightIO is a userland implemented green thread library for ruby
Stars: ✭ 165 (-96.25%)
Mutual labels:  async, io, networking
Uvloop
Ultra fast asyncio event loop.
Stars: ✭ 8,246 (+87.24%)
Mutual labels:  async, async-await, networking
Codejam
Set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another
Stars: ✭ 217 (-95.07%)
Mutual labels:  async, io
Asyncex
A helper library for async/await.
Stars: ✭ 2,794 (-36.56%)
Mutual labels:  async, async-await
Ntex
framework for composable networking services
Stars: ✭ 381 (-91.35%)
Mutual labels:  async, networking
Asyncorm
Fully Async ORM inspired in django's
Stars: ✭ 182 (-95.87%)
Mutual labels:  async, async-await
Use Async Effect
🏃 Asynchronous side effects, without the nonsense
Stars: ✭ 193 (-95.62%)
Mutual labels:  async, async-await
Await Of
await wrapper for easier errors handling without try-catch
Stars: ✭ 240 (-94.55%)
Mutual labels:  async, async-await
trimeter
(not ready yet) A simple but powerful job scheduler for Trio programs
Stars: ✭ 48 (-98.91%)
Mutual labels:  async-await, trio
Async Std
Async version of the Rust standard library
Stars: ✭ 3,090 (-29.84%)
Mutual labels:  async, async-await
Sqlalchemy aio
Asyncio strategy for SQLAlchemy.
Stars: ✭ 299 (-93.21%)
Mutual labels:  async, async-await
Smol
A small and fast async runtime for Rust
Stars: ✭ 2,206 (-49.91%)
Mutual labels:  async, networking
Kitsu
🦊 A simple, lightweight & framework agnostic JSON:API client
Stars: ✭ 166 (-96.23%)
Mutual labels:  async, async-await
Byte Stream
A non-blocking stream abstraction for PHP based on Amp.
Stars: ✭ 208 (-95.28%)
Mutual labels:  async, io
Await To Js
Async await wrapper for easy error handling without try-catch
Stars: ✭ 2,223 (-49.52%)
Mutual labels:  async, async-await
Coerce Rs
Coerce - an asynchronous (async/await) Actor runtime and cluster framework for Rust
Stars: ✭ 231 (-94.75%)
Mutual labels:  async, async-await
Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (-14.19%)
Mutual labels:  async, async-await
Unityfx.async
Asynchronous operations (promises) for Unity3d.
Stars: ✭ 143 (-96.75%)
Mutual labels:  async, async-await
Asyncutilities
A collection of somewhat useful utilities and extension methods for async programming
Stars: ✭ 157 (-96.44%)
Mutual labels:  async, async-await
sphinxcontrib-trio
Make Sphinx better at documenting Python functions and methods
Stars: ✭ 26 (-99.41%)
Mutual labels:  async-await, trio
Join chatroom Join forum Documentation Latest PyPi version Latest conda-forge version Test coverage

Trio – a friendly Python library for async concurrency and I/O

The Trio project aims 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 simultaneously, 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 to use it, but you should read and subscribe to issue #1 to get a 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! If you're impatient, then here's a simple concurrency example, an echo client, and an echo server.

How does Trio make programs easier to read and reason about than competing approaches? Trio is based on a new way of thinking that we call "structured concurrency". The best theoretical introduction is the article Notes on structured concurrency, or: Go statement considered harmful. Or, check out this talk at PyCon 2018 to see a demonstration of implementing the "Happy Eyeballs" algorithm in an older library versus Trio.

Cool, but will it work on my system? Probably! As long as you have some kind of Python 3.6-or-better (CPython or the latest PyPy3 are both fine), and are using Linux, macOS, Windows, or FreeBSD, then Trio will work. Other environments might work too, but those are the ones we test on. And all of our dependencies are pure Python, except for CFFI on Windows, which has wheels available, so installation should be easy (no C compiler needed).

I tried it, but it's not working. Sorry to hear that! You can try asking for help in our chat room or forum, 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 let's be honest, you'll fit in great around here. We have a whole sub-forum for discussing structured concurrency (developers of other systems welcome!). Or 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].