Asynchronous programming with asyncio and Qt
10-08, 11:25–12:00 (Europe/London), Antequera (Room 1.10)
Language: English

Python is a powerful language with a vast ecosystem of libraries for all imaginable use cases, yet developing GUI applications is perhaps a less widespread one. Writing first-class GUI applications in Python is certainly possible, and if you've ever tried to write one and researched GUI frameworks, chances are you've come across PySide, the bridge between Python and the popular C++ based GUI framework Qt. Qt for Python combines the best of both worlds, but the world of Python is more than just a language, and users expect wide interoperability within the ecosystem. Python developers deserve a first-class experience combining a powerful GUI framework with all their favorite and trusted Python libraries.

When it comes to asynchronous programming, asyncio is a household name. It is an established library for Python applications with concurrency and asynchronous I/O, and the de facto standard that multiple other asynchronous frameworks build upon. Like Qt, it is based on an event loop, and it offers an extensive API to implement a custom event loop that applications using asyncio can then leverage. Therefore, it is perhaps natural to combine Qt and asyncio and to leverage their respective strengths, but enabling this in Qt for Python posed some unique challenges - some stemming from asyncio, some from Qt.

This talk explains the principles of event loop-based asynchronous programming and dives into the steps and challenges encountered during the work to enable interoperability of these libraries: Implementing asyncio’s interface for event loops and related classes like Future and Task, based on Qt.


Software packages

Proposal Level

Intermediate (it is necessary to understand the related bases to go into detail)

I joined the Qt for Python team in July 2022, drawn in by the unique challenge of combining the worlds of Python and C++, a journey that has sometimes taken me into fascinating depths of the Python language and CPython interpreter. Previously I worked in the embedded and automotive industries, and graduated at Freie Universität Berlin.