Plugins #
The API offers methods to:
-
Install plugins
-
Uninstall plugins and list their usages
-
Update plugins
-
Read and write plugin settings
-
Create and update plugin code envs
-
List macros that can be run
-
Run macros
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 #
|
A plugin on the DSS instance. |
The settings of a plugin. |
|
A parameter set in a plugin. |
|
Information on a usage of an element of a plugin. |
|
Information on a type not found while analyzing usages of a plugin. |
|
Information on the usages of a plugin. |
|
|
A macro on the DSS instance. |