EuroPython 2016

Python and Async programming

Speaker(s) Nicolas Lara

How does the experienced python programmer fair when faced with python’s “new” way of doing async programing in for the first time? Do we all know how and when to use Futures, yield from, asyncio, coroutines, the async and await keywords, eventloops, and others?

A lot has changed in recent versions of Python when it comes to async programming, concurrency, and parallelism. We still have very different ways of approaching the problem in each version, but they are finally (as of python 3.4/3.5) converging to a standard.

This talk explores, from the perspective of an experienced python programmer with little to no experience in async programming, what the “one obvious way” to do async programming in Python is supposed to be. It does so but analysing examples of different categories of async problems we may want to solve and what the correct way to solve them with the latest versions of Python would be (along with the trade offs of different approaches).

The examples include generic CPU-bound problems, IO-bound problems, and “both-bound” problems; along with common tasks as building a simple server, scraping, deferring a web response, and traversing graphs.

When useful, I compare the solutions with the approach we would take in languages that have been design for- and are known to be good at async programming like Javascript and Go.

in on Monday 18 July at 14:15 See schedule


  1. Gravatar
    Hi Nic,
    Since this is quite a technical topic, it would be great if you could also mention your background in it. And also how you are using it to solve problems.

    Best Regards,
    — Arjun Naik,
  2. Gravatar
    Thanks for the question!

    I don't have any extensive background in the topic, but I'm familiar with the API and I've been following the changes in each version. This is why I'm approaching it "from the perspective of an experienced python programmer with little-to-no experience in async programming". At work, we've ended up using Go in the past to solve our concurrency problems (for realtime-web), and I've been looking into how to handle those problems in pure Python.

    The perspective of this talk is of "I do the research, and make the mistakes, so you don't have to"

    — Nicolas Lara,

New comment