PyCon UK 2019

Concurrent asyncio and sanity
09-16, 14:30–15:00 (Europe/London), Ferrier Hall

Do you find programming with asyncio daunting? Are you wondering how you'd build a real-world network-connected service with this and not die trying? In this talk I want to share some best practices and tips to help you create reliable, maintainable applications using concurrency.


When a customer approached me to create a new platform to collect metadata from some 10.000 different 3rd-party sources on the web, using a host of different formats, every 30 seconds, I knew Python would be up to the task. By using asyncio you can build very efficient concurrent applications.

But how do you keep your application code organised, and not end up passing around a bunch of queues from one function to another?

In this talk, I'll show you how I built this application, and share my philosophy on structuring a concurrent app, and how to handle:

  • modularised concurrent code
  • how to plan for and contain exceptions
  • configuration
  • logging and monitoring

Is your proposal suitable for beginners? – maybe

Software architect, Python mentor & Consultant with a long history in serious web applications, database-driven and content management. Martijn is the top contributor on Stack Overflow for Python questions, ranked #9 overall and I was elected ♦ Community Moderator in 2015.

He works as an independent consultant, and has built web applications used by millions, as well as specialised networked applications to gather and process large amounts of data.