conferences | speakers | series

Writing Plugin Friendly Python Applications

home

Writing Plugin Friendly Python Applications
PyCon DE & PyData Berlin 2023

In modern software engineering, plugin systems are a ubiquitous way to extend and modify the behavior of applications and libraries. When software is written in a way that is plugin friendly, it encourages the use of modular organization where the contracts between the core software and the plugin have been well thought out. In this talk, we cover exactly how to define this contract and how you can start designing your software to be more plugin friendly. Throughout the talk we will be creating our own plugin friendly application using the [pluggy](https://pluggy.readthedocs.io/en/stable/) library to show these design principles in action. At the end of the talk, I also cover a real-life case study of how the package manager [conda](https://github.com/conda/conda) is currently making its 10 year old code more plugin friendly to illustrate how to retrofit an existing project.

This talk begins with a general discussion about what plugins are and how they are used in software. We cover important theoretical concepts and show just how pervasive plugins are in much of the software we use everyday. With a firm idea about what plugins allow us to do, we will begin creating our own command line application that downloads images via APIs given a search term. We will write our application with plugins in mind so that we can quickly expand and support any number of image searching backends (e.g. Google, Unsplash, etc.). The presentation will focus on everything we have to do to let plugin authors extend our application and add their own backends. A fully functional implementation of this application can be found here: [https://github.com/travishathaway/latz](https://github.com/travishathaway/latz). After building our own application, I will then present how the [conda](https://github.com/conda/conda) project approaches making its software plugin friendly. Much of what I show in the example also applies to conda's plugin architecture. This talk should prepare those interested in writing their own plugin friendly applications to get started with the [pluggy](https://pluggy.readthedocs.io/en/stable/) library. The [example project](https://github.com/travishathaway/latz) will also provide a great starting point and inspiration for new and existing applications.

Speakers: Travis Hathaway