lml
Load me later. A lazy plugin management system.
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 lmluv
uv add lmlpoetry
poetry add lmlInstalling 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
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
stevedoreStevedore manages dynamic plugin loading for…
permissive · top 1,000 on PyPI
pluginlibPluginlib provides a framework for defining,…
copyleft · top 15,000 on PyPI
lazy-modelLazy-model provides on-demand field parsing for…
permissive · top 5,000 on PyPI
pluxPlux is a dynamic plugin loading framework…
permissive · top 5,000 on PyPI
lazy-loaderLazy-loader defers the import of subpackages…
permissive · top 1,000 on PyPI
LazifyLazify provides lazy evaluation utilities for…
permissive · top 15,000 on PyPI
lazy-importDefers module loading and ImportErrors until a…
copyleft · top 15,000 on PyPI
plugincodePlugincode provides a plugin system for Python…
permissive · top 15,000 on PyPI
pluginbasePluginBase provides a framework for building…
permissive · top 5,000 on PyPI
nornirNornir is a pure Python automation framework…
permissive · top 15,000 on PyPI