Asynchronous I/O

Coroutines and Tasks

This section outlines high-level asyncio APIs to work with coroutines and Tasks.


Source code: Lib/asyncio/, Lib/asyncio/


Source code: Lib/asyncio/


Source code: Lib/asyncio/

Synchronization Primitives

Source code: Lib/asyncio/

Event Loop

Source code: Lib/asyncio/, Lib/asyncio/

Transports and Protocols

Transports and Protocols are used by the low-level event loop APIs such as loop.create_connection(). They use callback-based programming style and enable high-performance implementations of network or IPC protocols (e.g. HTTP).


Source code: Lib/asyncio/, Lib/asyncio/


Source code: Lib/asyncio/


An event loop policy is a global per-process object that controls the management of the event loop. Each event loop has a default policy, which can be changed and customized using the policy API.

Platform Support

The asyncio module is designed to be portable, but some platforms have subtle differences and limitations due to the platforms’ underlying architecture and capabilities.

High-level API Index

This page lists all high-level async/await enabled asyncio APIs.

Low-level API Index

This page lists all low-level asyncio APIs.

Developing with asyncio

Asynchronous programming is different from classic “sequential” programming.

asyncio — Asynchronous I/O

asyncio is a library to write concurrent code using the async/await syntax.