skillfed

lml

Load me later. A lazy plugin management system.

lml v0.2.0 2.6M downloads/30d#2,992 on PyPI12
Permissive license New BSD AGING released

What it is and what it does

lml is a plugin management framework that lets you define, discover, and load plugins from your Python environment without loading them all at startup. Instead of importing all plugins upfront—which can be slow and memory-intensive if they have heavy dependencies—lml defers loading until you actually request a plugin. You decorate plugin classes or functions with @PluginInfo, subclass PluginManager to define how plugins are retrieved, and call get_a_plugin() when needed. The system discovers plugins installed in your environment automatically, so users can add or remove plugins via pip without changing your application code.

The package has no runtime dependencies and is designed for library authors who want to let their users pick and choose optional functionality. It replaces the Factory pattern with a discovery-based approach, making it easier to distribute related features across separate installable packages. lml handles the registration and lookup; you handle the plugin interface design.

Use it for:

  • Modular data processing libraries where users install only the format handlers or transformers they need
  • Applications with optional integrations that should not load unless used
  • Large projects that want to split functionality into separate packages to reduce initial import time
  • Plugin ecosystems where end users can extend functionality by installing third-party packages without modifying core code

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

lml provides a lazy plugin management system that discovers and loads plugins on demand rather than at startup, designed to defer loading of plugins with heavy external dependencies.

Yes, if you are building a library or application that needs a plugin architecture and want to defer loading of heavy dependencies. The package is stable, has no external dependencies, and is used in established projects. However, the aging maintenance status means you should verify it works with your target Python versions before committing to it as a core dependency.

Install

lml on PyPI

pip

pip install lml

uv

uv add lml

poetry

poetry add lml

Installing lml

Before you install

Low install friction with no runtime dependencies. Maintenance status is aging—last release was 516 days ago, though the repository remains active.

License in practice

Licensed under New BSD (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

from lml.plugin import PluginInfo, PluginManager

@PluginInfo("cuisine", tags=["Portable Battery"])
class Boost(object):
    def make(self, food=None, **keywords):
        print("I can cook %s for robots" % food)

class CuisineManager(PluginManager):
    def __init__(self):
        PluginManager.__init__(self, "cuisine")

manager = CuisineManager()
chef = manager.get_a_plugin("Portable Battery")
chef.make()

Verify before relying

  • Whether lazy loading actually reduces memory footprint in practice for typical plugin scenarios
  • Current Python version support—classifiers list Python 2.6 through 3.8, but 0.2.0 removed Python 2 support; exact supported range unclear

Package facts

License New BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 516 days since the last release
Last repo commit
First released
Downloads 2,580,018/month — #2,992 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: lml-0.2.0-py2.py3-none-any.whl

Keywords: python

Intended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries

Tags

lazy plugin loadingplugin management systemdynamic plugin discoveryon-demand plugin loadingplugin framework pythondeferred dependency loadingplugin registry
plugin-systemlazy-loading

More Libraries packages