Managing plugins

The API offers methods to:

  • Install plugins
  • Update plugins
  • Read and write plugin settings
  • Create and update plugin code envs

Installing plugins

From a Zip file

with open("", "r") as f:

See install_plugin_from_archive() for more details.

From the Dataiku plugin store

future = client.install_plugin_from_store("googlesheets")

See install_plugin_from_store() for more details.

From a Git repository

future = client.install_plugin_from_git("[email protected]:myorg/myrepo")

See install_plugin_from_git() 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()

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

Reference documentation

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

A plugin on the DSS instance


Return the plugin-level settings

Returns:a DSSPluginSettings
create_code_env(python_interpreter=None, conda=False)

Starts the creation of the code env of the plugin

Returns:a dataikuapi.dssfuture.DSSFuture

Starts an update of the code env of the plugin

Returns:a dataikuapi.dss.future.DSSFuture

Updates the plugin from a plugin archive (as a file object)

Parameters:fp (object) – A file-like object pointing to a plugin archive zip

Updates the plugin from the Dataiku plugin store

Returns:a DSSFuture
update_from_git(repository_url, checkout='master', subpath=None)

Updates the plugin from a Git repository. DSS must be setup to allow access to the repository.

  • repository_url (str) – URL of a Git remote
  • checkout (str) – branch/tag/SHA1 to commit. For example “master”
  • subpath (str) – Optional, path within the repository to use as plugin. Should contain a ‘plugin.json’ file

a DSSFuture


Get the hierarchy of files in the plugin (dev plugins only)


Get a file from the plugin folder (dev plugins only)

Parameters:path (str) – the path of the file, relative to the root of the plugin
Returns:a file-like object containing the file’s content
put_file(path, f)

Update a file in the plugin folder (dev plugins only)

  • f (file-like) – the file contents, as a file-like object
  • path (str) – the path of the file, relative ot the root of the plugin
class dataikuapi.dss.plugin.DSSPluginSettings(client, plugin_id, settings)

The settings of a plugin.


Returns the raw settings object


Saves the settings to DSS