Async Techniques and Examples in Python Transcripts
Chapter: Built on asyncio
Lecture: Introducing Trio
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
The next extra library that we're going to look at that builds on asyncio and makes it better and easier and simpler is Trio.
0:09
Trio's goal is to produce a production quality, permissively licensed async and await native io library for Python.
0:16
So it has a bunch of things for work with networks and so on, but it also has really great support for just
0:22
coordinating anything built on top of asyncio itself. So where Trio really shines is it tries to focus on making coordination around asyncio simpler.
0:33
They want to make it easy to do the best right thing with asyncio, so what's interesting is this is a framework
0:39
built entirely from the ground up that integrates with async and await, but does not directly use asyncio.
0:46
So like asyncio.get_event_loop, that is not part of this whole framework, it's something similar and in parallel to that
0:55
and you actually have to use a bridging library. Something called trio-asyncio in order to actually use things built on the asyncio event loop.
1:05
I think you'll find Trio an interesting library that could work for certain circumstances and types of apps you're building.