Install & Compatibility
Where this runs
tested against v0.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.028s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.024s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PluginInfo
✓ from lml.plugin import PluginInfo
Decorator for registering plugin metadata.
PluginManager
✓ from lml.plugin import PluginManager
Base class for managing and retrieving plugins.
This example demonstrates how to define a plugin using `PluginInfo` and manage it with a custom `PluginManager`. It registers a 'Boost' plugin under the 'cuisine' category with the tag 'Portable Battery', and then retrieves and uses it.
from lml.plugin import PluginInfo, PluginManager
@PluginInfo("cuisine", tags=["Portable Battery"])
class Boost(object):
def make(self, food=None, **keywords):
print(f"I can cook {food} for robots")
class CuisineManager(PluginManager):
def __init__(self):
PluginManager.__init__(self, "cuisine")
def get_a_plugin(self, food_name=None, **keywords):
# 'key' is the primary key used during registration, often the first tag
return PluginManager.get_a_plugin(self, key=food_name, **keywords)
if __name__ == '__main__':
manager = CuisineManager()
chef = manager.get_a_plugin("Portable Battery")
if chef:
chef.make(food="Portable Battery")
else:
print("No chef found for Portable Battery")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lml'
The 'lml' package is not installed in your Python environment.
ImportError: cannot import name 'scan_plugins_regex' from 'lml.loader'
This typically occurs due to an incompatibility between the installed version of 'lml' and a library that depends on it (e.g., 'pyexcel-io'), where the dependent library expects a different API or an older 'lml' version is installed.
fixEnsure that 'lml' and its dependent libraries are compatible. Try upgrading both 'lml' and the problematic dependent library (e.g., 'pip install --upgrade lml pyexcel-io') or installing a specific compatible version if known.
AttributeError: 'PluginName' object has no attribute 'method_name'
This error arises when a plugin managed by 'lml' is either not correctly loaded, registered, or the object returned by the plugin does not have the expected method or attribute, often due to an outdated plugin interface or a misconfigured plugin.
fixVerify that your plugin adheres to the expected interface defined by your 'lml'-enabled application. Check plugin registration and ensure the plugin's class or function provides the 'method_name' being accessed. Update or reconfigure the plugin if necessary.
Upgrade
Version history
0.2.0latest on PyPI · released Mar 16, 2025
Audit
Dependencies
No dependency data recorded yet.