Plugins #

The API offers methods to:

Installing plugins #

From a Zip file #

with open("myplugin.zip", "r") as f:
    client.install_plugin_from_archive(f)

See install_plugin_from_archive() for more details.

From the Dataiku plugin store #

future = client.install_plugin_from_store("googlesheets")
future.wait_for_result()

See install_plugin_from_store() for more details.

From a Git repository #

future = client.install_plugin_from_git("git@github.com:myorg/myrepo")
future.wait_for_result()

See install_plugin_from_git() for more details.

Uninstalling plugins #

Listing usages of a plugin #

plugin = client.get_plugin('my-plugin-id')
usages = plugin.list_usages()

See list_usages() for more details.

Uninstalling a plugin #

plugin = client.get_plugin('my-plugin-id')
future = plugin.delete()

Plugin deletion fails if a usage is detected. It can be forced with force=True :

plugin = client.get_plugin('my-plugin-id')
future = plugin.delete(force=True)

See delete() for more details.

Managing code envs #

plugin = client.get_plugin("myplugin")

# Start creating the code env, and wait for it to be done
future = plugin.create_code_env()
result = future.wait_for_result()

# NB: If the plugin requires Python 3.6 for example, you will use something like:
# plugin.create_code_env(python_interpreter="PYTHON36")

# Now the code env is created, but we still need to configure the plugin to use it
settings = plugin.get_settings()
settings.set_code_env(result["envName"])
settings.save()

Handling settings #

plugin = client.get_plugin("myplugin")

# Obtain the current settings
settings = plugin.get_settings()
raw_settings = settings.get_raw()

# Modify the settings
# ...

# And save them back
settings.save()

Reference documentation #

dataikuapi.dss.plugin.DSSPlugin (client, ...)

A plugin on the DSS instance.

dataikuapi.dss.plugin.DSSPluginSettings (...)

The settings of a plugin.

dataikuapi.dss.plugin.DSSPluginParameterSet (...)

A parameter set in a plugin.

dataikuapi.dss.plugin.DSSPluginUsage (data)

Information on a usage of an element of a plugin.

dataikuapi.dss.plugin.DSSMissingType (data)

Information on a type not found while analyzing usages of a plugin.

dataikuapi.dss.plugin.DSSPluginUsages (data)

Information on the usages of a plugin.

dataikuapi.dss.macro.DSSMacro (client, ...[, ...])

A macro on the DSS instance.