AI engineering glossary · Python advanced

What is asyncio?

asyncio: Python's standard library for writing single-threaded concurrent code with async and await, driven by an event loop. It suits programs that spend most of their time waiting on networks, such as calling many APIs.

Level: intermediateTopic: Python advanced

asyncio: an example

asyncio.gather(fetch(a), fetch(b)) waits on two web requests at once within one thread.

Related terms

More Python advanced terms

Where you learn it

asyncio is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.