Equips Python applications with a structured plugin system.
A plugin system poses two tightly coupled challenges: implementing a structured and extensible architecture on the host side, and conforming to a standardized interface on the plugin side. Without a formalized framework, host developers must manually discover, validate, and register plugins, while plugin developers must reverse-engineer the host's expectations.
- Host applications — define plugin interfaces, discover and register plugins, and coordinate execution.
- Plugin developers — implement compliant modules with minimal boilerplate following validated specs.
- End users — install and activate plugins transparently.
- Plugin specification: Define a common interface ensuring plugin compatibility with the host application.
- Plugin discovery: Locate plugins from multiple sources, triggered automatically or manually.
- Plugin validation: Validate plugin schema conformance and host compatibility.
- Plugin registration: Enable, disable, and organize plugins for flexible host integration.
- Extensible CLI: Extend the command-line interface with commands that plugins provide.
Define a plugin model (host side):
from khimera.plugins.declare import PluginModel
from khimera.core.specifications import FieldSpec
model = PluginModel(name="my_host", version="1.0")
model.add(FieldSpec(name="commands", unique=False))Create a plugin (developer side):
from khimera.plugins.create import Plugin
plugin = Plugin(model=model, name="my_plugin")
plugin.add("commands", my_command_component)| Guide | Content |
|---|---|
| Installation | Prerequisites, pip/conda/source setup |
| Usage | Workflows and detailed examples |
| Architecture | Design, module organization |
| Dependencies | Dependency graph |
Full API documentation and rendered guides are also available at esther-poniatowski.github.io/khimera.
Contribution guidelines are described in CONTRIBUTING.md.
Author: @esther-poniatowski
For academic use, the GitHub "Cite this repository" feature generates citations in various formats. The citation metadata file is also available.
This project is licensed under the terms of the GNU General Public License v3.0.