Building modular plugin-based Python distributions with Plux

Harsh Mishra (~HarshCasper)




Entry points are a mechanism for an installed distribution to advertising components it provides to be discovered and used by other code. Although Python entry points make it easy to discover and dynamically load code from third-party distributions, Python has no higher-level concept of a plugin, making it challenging to reuse for common patterns. Moreover, most existing plugin libraries are designed to work with explicit code importing or rely on conventions to locate code.

In this talk, we will explore Plux, a dynamic code-loading framework that does not rely on conventions, explicit code imports, or manually declaring entry points. This creates a highly easy-to-use and flexible way to declare and use plugins and build modular & pluggable distributions. With Plux, Callback hooks, functional plugins, class-based plugins, and even values can be easily exposed as plugins without manually modifying the list of entry points

We will also showcase several patterns we have implemented in Plux and how you can have thousands of plugins in your Python applications that would be scalable. The outline for this talk is as follows:

  • Introduction to dynamic code loading [3 minutes]
  • Dynamic code loading patterns in Python applications [7 minutes]
  • Getting started with Plux [5 minutes]
  • Building a Python application with Plux [10 minutes]
  • Q&A [5 minutes]


This talk requires an understanding of the following:

  • Python packages and distributions
  • Entry points in Python and their purpose

If you want to write plugins using Python and scale modular distributions, this talk will interest you!

Speaker Info:

Harsh is an engineer at LocalStack working at improving the developer experience of engineers developing/testing cloud applications on AWS. He is also an AWS Community Builder in the Serverless category and has previously worked at Red Hat, HackerRank, and Quansight! He is deeply passionate about cloud & serverless development, including DevOps, practises, Web engineering, and using technology to mitigate climate change.

Speaker Links:

  • Personal blog
  • Technical blog
  • LinkedIn
  • Twitter
  • GitHub
  • Past talks: PyCon India '21, PyCon APAC '21, PyCon MY '21, EuroPython '21, Open Source Summit Latin America '22, GitKon '22, Python Web Conference '23
  • Open Source contributions:
    • Granted Google Peer Bonus Award for my contributions to moja global
    • Google Summer of Code student developer at MetaCall
    • Google Season of Docs technical writer at moja global
    • MLH Fellow for the Fall '21 Batch
    • Contributions to various open-source projects — LocalStack, Nebari, SciPy, CausalML, Conda Store, AsyncAPI, and more!

Section: Developer tools and automation
Type: Talks
Target Audience: Intermediate
Last Updated: