Skip to content

Conversation

@kageurufu
Copy link
Member

This enables plugins to provide a python entrypoint, and then users can just pip install plugins they need.

This extends the module loading to search the entrypoint kalico.plugins for modules matching the configured name.

Entrypoints expose the normal load_config(config: ConfigWrapper) -> object or load_config_prefix(config: ConfigWrapper) -> object interface.

Supporting this is usually as simple as adding a pyproject.toml to the plugin's repository with [project.entry-points."kalico.plugins"] my_plugin = "module".

This also starts some documentation on plugin development

kageurufu added a commit to kageurufu/klipper-tmc-4671 that referenced this pull request Jun 11, 2025
This builds a package with the entrypoint `kalico.plugins.tmc4671`,
which can be loaded by KalicoCrew/kalico#705
@kageurufu kageurufu force-pushed the plugins branch 2 times, most recently from 4b2383c to c0dbc88 Compare June 11, 2025 18:15
Exposes loaded plugins with their readmes on /printer/info
 for frontends to use
Use plugin loading during py.test for the testing plugin.

This both verifies PYTHONPATH loading for non-pip installed plugins
(without dependencies), and that entrypoints load properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants