There's good and bad news when it comes to the plug-in framework implementation in Python. The bad news is that there is no standard approach in implementing the plug-in architecture. There are several different techniques, as well as commercial and open source products to use, but they each approach the problem differently. Some are better in one area, but may fall short in other areas. The way you choose to implement this architecture largely depends on what you want to achieve.
The good news is that there is no de facto standard for implementing the plug-in framework, so we get to write our own! As we write the implementation, you'll learn several new things about the Python language and programming techniques, such as class type inspection, duck typing, and dynamic module loading.
Before we dive into the technical details, let's establish exactly what a plug-in is and how it is related to the main, or host, application.
Was this article helpful?