diff --git a/docs/plugins/concepts.rst b/docs/plugins/concepts.rst index 42b66d37..947b0ed7 100644 --- a/docs/plugins/concepts.rst +++ b/docs/plugins/concepts.rst @@ -299,6 +299,8 @@ An overview of these properties follows. The plugin's name, as taken from either the ``__plugin_name__`` control property or the package info. ``self._plugin_version`` The plugin's version, as taken from either the ``__plugin_version__`` control property or the package info. +``self._plugin_info`` + The :class:`octoprint.plugin.core.PluginInfo` object associated with the plugin. ``self._basefolder`` The plugin's base folder where it's installed. Can be used to refer to files relative to the plugin's installation location, e.g. included scripts, templates or assets. diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index bcb28ce0..6b7b327b 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -902,6 +902,7 @@ class PluginManager(object): identifier=name, plugin_name=plugin.name, plugin_version=plugin.version, + plugin_info=plugin, basefolder=os.path.realpath(plugin.location), logger=logging.getLogger(self.logging_prefix + name), ))