Project folders#

For more details and samples, please see Project folders

class dataikuapi.dss.projectfolder.DSSProjectFolder(client, data)#

A handle for a project folder on the DSS instance.

Important

Do not instantiate this class directly, instead use dataikuapi.DSSClient.get_project_folder() or dataikuapi.DSSClient.get_root_project_folder().

property id#
Returns:

The project folder id.

Return type:

string

property project_folder_id#

Caution

Deprecated. Please use dataikuapi.dss.projectfolder.DSSProjectFolder.id.

property name#
Returns:

The project folder name or None for the root project folder.

Return type:

string

get_name()#

See dataikuapi.dss.projectfolder.DSSProjectFolder.name.

Returns:

The project folder name or None for the root project folder.

Return type:

string

get_path()#
Returns:

The project folder path from the root project folder (e.g. '/' or '/foo/bar').

Return type:

string

get_parent()#
Returns:

A handle for the parent folder or None for the root project folder.

Return type:

dataikuapi.dss.projectfolder.DSSProjectFolder

list_child_folders()#
Returns:

Handles for every child project folder.

Return type:

list of dataikuapi.dss.projectfolder.DSSProjectFolder

list_project_keys()#
Returns:

The project keys of all projects stored in this project folder.

Return type:

list of string

list_projects()#
Returns:

Handles for every project stored in this project folder.

Return type:

list of dataikuapi.dss.project.DSSProject

delete()#

Delete this project folder.

Important

This project folder must be empty, i.e. contain no project or subfolder. You must move or remove all this project folder content prior to deleting it.

Attention

This call requires an API key with admin rights.

get_settings()#
Returns:

A handle for this project folder settings.

Return type:

dataikuapi.dss.projectfolder.DSSProjectFolderSettings

create_sub_folder(name)#

Create a project subfolder inside this project folder.

Parameters:

name (str) – The name of the project subfolder to create.

Returns:

A handle for the created project subfolder.

Return type:

dataikuapi.dss.projectfolder.DSSProjectFolder

create_project(project_key, name, owner, description=None, settings=None)#

Create a new project within this project folder. Return a handle for the created project.

Important

The provided identifier for the new project must be globally unique.

Attention

This call requires an API key with admin rights or the right to create a project.

Parameters:
  • project_key (str) – The identifier for the new project. Must be globally unique.

  • name (str) – The displayed name for the new project.

  • owner (str) – The login of the new project owner.

  • description (str) – The description for the new project.

  • settings (dict) – The initial settings for the new project. The settings can be modified later. The exact possible settings are not documented.

Returns:

A handle for the created project.

Return type:

dataikuapi.dss.project.DSSProject

move_to(destination)#

Move this project folder into another project folder.

Parameters:

destination (dataikuapi.dss.projectfolder.DSSProjectFolder) – The new parent project folder of this project folder.

move_project_to(project_key, destination)#

Move a project from this project folder into another project folder.

Parameters:
class dataikuapi.dss.projectfolder.DSSProjectFolderSettings(client, project_folder_id, settings)#

A handle for a project folder settings.

Important

Do not instantiate this class directly, instead use dataikuapi.dss.projectfolder.DSSProjectFolder.get_settings().

get_raw()#

Get the settings of the project folder as a python dict.

Important

Returns a reference to the raw settings in opposition to a copy. Changes through the reference will be effective upon saving.

Returns:

The settings of the project folder as a python dict containing the keys:

  • name: the name of the project folder,

  • owner: the login of the project folder owner,

  • permissions: the list of the project folder permissions.

Return type:

python dict

get_name()#
Returns:

The name of the project folder.

Return type:

string

set_name(name)#

Set the name of the project folder.

Parameters:

name (str) – The new name of the project folder.

get_owner()#
Returns:

The login of the project folder owner.

Return type:

string

set_owner(owner)#

Set the owner of the project folder.

Parameters:

owner (str) – The login of the new project folder owner.

get_permissions()#

Get the permissions of the project folder.

Important

Returns a reference to the permissions in opposition to a copy. Changes through the reference will be effective upon saving.

Returns:

The permissions of the project folder.

Return type:

list of string

save()#

Save back the settings to the project folder.