Async IO in Python

Course objectives

After completing this course you will be able to:

  • use the asyncio library to write asynchronous code
  • test and debug asynchronous code

Course syllabus

Fundamentals of asynchronous programming

  • Generators, generator functions and coroutines
  • Use cases

asyncio library

  • Key players - coroutines, futures, tasks and loops

Asynchronous:

  • Functions (async def)
  • Loops (async for)
  • Context managers (async with)
  • await instruction

Working with legacy code

  • Old syntax (yield from)
  • Mixing old syntax (yield from) with the new one (async and await)

Testing asynchronous code with unittest

  • Testing asynchronous code (unittest, doctest, code coverage)
  • Mocking and test isolation

Debugging asynchronous code

  • Synchronizing Coroutines

Common idioms and traps

Prerequisites

Basic knowledge of Python programming language.

Course duration

2 days, 8 class hours each
On-site course quote

In-house training course.

Run at your company premises.

Get a quote
On-line course quote

In-house training course.

Delivered live in a virtual classroom.

Get a quote
Upcoming public courses

No scheduled dates available for this course?

Request a course