Skip to content

Plugins

Loading plugins

If plugins are written as modules, once they are installed, they are enabled.

You can use configurations to disable some plugins:

[default]
plugins = ['no:pyppl_rich', 'no:pyppl_export']

You can also load plugins manually if they are written as a class object:

from pyppl import config_plugins

# enable pyppl_rich, but disable pyppl_export
config_plugins('pyppl_rich', 'no:pyppl_export')

Plugin hooks

The plugin system is implemented with pluggy

See all available plugins APIs here.

Entry point

You can register plugins by yourself using pyppl.config_plugins. However, if you want to expose your plugin to PyPPL by adding entrypoint to your setup.py, pyproject.toml or other equivalent packaging setting files:

For setup.py, you will need:

setup(
	# ...
	entry_points={"pyppl": ["pyppl_report = pyppl_report"]},
	# ...
)

For pyproject.toml:

[tool.poetry.plugins.pyppl]
pyppl_report = "pyppl_report"