EuroPython 2015

Better asynchronous code with Tornado and Python 3

The asyncio module introduced in Python 3.4 is a game-changer for I/O management and event-driven network programming in Python. Aiming to be a lower-level implementation of an asynchronous event loop, it intends that higher level frameworks like Tornado, Twisted or Gevent will build on top of it, taking advantage of the shared interface for writing concurrent event-driven code across different Python frameworks.

This talk connects theory with practice, presenting how Tornado can run in the asyncio event loop and take advantage of the subgenerator delegation syntax (yield from) to provide a high degree of concurrency while keeping the simplicity of sequential code. It explains the concept of coroutines, futures and ioloop, exposing Python 3 code for sample web tasks. The talk completes with a basic demo of running this code on Tornado, comparing its syntax and performance with popular asynchronous frameworks from other languages.

in on Thursday 23 July at 11:00 See schedule

Video


Do you have some questions on this talk?

New comment