Skip to content

Commit 08301dc

Browse files
Cosmetics
1 parent d4f2f70 commit 08301dc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dataikuapi/dss/notebook.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __init__(self, client, project_key, notebook_name, state=None, content=None)
1414

1515
def unload(self, session_id=None):
1616
"""
17-
Stop the notebook and release its resources
17+
Stop this Jupyter notebook and release its resources
1818
"""
1919
state = self.get_state()
2020
if state is None:
@@ -33,20 +33,20 @@ def unload(self, session_id=None):
3333

3434
def get_state(self):
3535
"""
36-
Get the status of the notebook
36+
Get the status of this Jupyter notebook
3737
"""
38-
notebook_list = self.client._perform_json("GET",
38+
notebook_states = self.client._perform_json("GET",
3939
"/projects/%s/jupyter-notebooks/" % self.project_key,
4040
params={"active": False})
41-
for notebook in notebook_list:
41+
for notebook in notebook_states:
4242
if notebook.get("name") == self.notebook_name:
4343
self.state = notebook
4444
return self.state
4545
return self.state
4646

4747
def get_sessions(self):
4848
"""
49-
Get the list of the running sessions of this notebook
49+
Get the list of the running sessions of this Jupyter notebook
5050
"""
5151
state = self.get_state()
5252
if state is None:
@@ -57,7 +57,7 @@ def get_sessions(self):
5757

5858
def get_content(self):
5959
"""
60-
Get the content of this notebook (metadata, cells, nbformat)
60+
Get the content of this Jupyter notebook (metadata, cells, nbformat)
6161
"""
6262
if self.content is None:
6363
self.content = self.client._perform_json("GET",
@@ -66,15 +66,15 @@ def get_content(self):
6666

6767
def save(self):
6868
"""
69-
Save the content of this notebook
69+
Save the content of this Jupyter notebook
7070
"""
7171
return self.client._perform_json("PUT",
7272
"/projects/%s/jupyter-notebooks/%s" % (self.project_key, self.notebook_name),
7373
body=self.content)
7474

7575
def delete(self):
7676
"""
77-
Delete this jupyter notebook and stop all of its active sessions.
77+
Delete this Jupyter notebook and stop all of its active sessions.
7878
"""
7979
return self.client._perform_json("DELETE",
8080
"/projects/%s/jupyter-notebooks/%s" % (self.project_key, self.notebook_name))

0 commit comments

Comments
 (0)