Skip to content

Commit c39d1ab

Browse files
authored
Merge pull request #134 from dataiku/fix/dss-90-jupyter-api-rm
Deleting unecessary API
2 parents 8c88413 + d39e39f commit c39d1ab

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

dataikuapi/dssclient.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -94,39 +94,15 @@ def get_future(self, job_id):
9494
# Notebooks
9595
########################################################
9696

97-
98-
def list_jupyter_notebooks(self, active=False, as_objects=True):
99-
"""
100-
List the Jupyter notebooks for every projects
101-
102-
:param boolean active: if True, only the active notebooks
103-
:param boolean as_objects: if True, each returned item will be a :class:`dataikuapi.dss.notebook.DSSJupyterNotebook`
104-
105-
:return: list of notebooks. if as_objects is True, each entry in the list is a :class:`dataikuapi.dss.notebook.DSSJupyterNotebook`. Else, each item in the list is a dict which contains at least a "name" field.
106-
:rtype: list of :class:`dataikuapi.dss.notebook.DSSJupyterNotebook` or list of dict
107-
"""
108-
project_keys = self.list_project_keys()
109-
output = []
110-
for project_key in project_keys:
111-
notebook_names = self._perform_json("GET", "/projects/%s/jupyter-notebooks/" % project_key, params={"active": active})
112-
if as_objects:
113-
output += [DSSJupyterNotebook(self, project_key, notebook_name) for notebook_name in notebook_names]
114-
else:
115-
for notebook_name in notebook_names:
116-
output.append({u"projectKey": project_key, u"name": notebook_name})
117-
return output
118-
11997
def list_running_notebooks(self, as_objects=True):
12098
"""
121-
Deprecated. Use :meth:`DSSClient.list_jupyter_notebooks`
12299
List the currently-running Jupyter notebooks
123100
124101
:param boolean as_objects: if True, each returned item will be a :class:`dataikuapi.dss.notebook.DSSNotebook`
125102
126103
:return: list of notebooks. if as_objects is True, each entry in the list is a :class:`dataikuapi.dss.notebook.DSSNotebook`. Else, each item in the list is a dict which contains at least a "name" field.
127104
:rtype: list of :class:`dataikuapi.dss.notebook.DSSNotebook` or list of dict
128105
"""
129-
warnings.warn("Use DSSClient.list_jupyter_notebooks", DeprecationWarning)
130106
notebook_list = self._perform_json("GET", "/admin/notebooks/")
131107
if as_objects:
132108
return [DSSNotebook(self, notebook['projectKey'], notebook['name'], notebook) for notebook in notebook_list]

0 commit comments

Comments
 (0)