Skip to content

Plugins

Looking for?

  • The design principles behind plugins, check guide.
  • How to create a plugin, check the guide.
  • How to manage plugins from a GUI, check the Clafoutis guide.

Introduction

In order to enable a plugin, you must first register its source. The source only takes a http(s) URL to the Git repository of the plugin.

Once the source is registered, it can be enabled, by specifying a version, and a project if the plugin's scope is not global (this is the most common case). A plugin object is then returned.

Register a source

from bip import link

link.plugin.register("https://github.com/someone/my-plugin.git")

Enable a plugin

Tip

If the plugin has a global scope, just don't specify a project!

from bip import link

demo = link.project.get_project("demo", model="basic")
source = link.plugin.get_source("salambo")
tag = source.get_latest_version()  # v0.0.1
plugin = source.enable(version=tag, project=demo)

Update a plugin

from bip import link

demo = link.project.get_project("demo", model="basic")
source = link.plugin.get_source("salambo")
plugin = source.get_plugin(demo)
plugin.set_version("v0.0.2")

Disable a plugin

Danger

Not yet implemented!