@@ -38,12 +38,12 @@ def get_sessions(self, as_objects=False):
3838 else :
3939 return sessions
4040
41- def get_contents (self ):
41+ def get_content (self ):
4242 """
4343 Get the content of this Jupyter notebook (metadata, cells, nbformat)
4444 """
45- raw_contents = self .client ._perform_json ("GET" , "/projects/%s/jupyter-notebooks/%s" % (self .project_key , self .notebook_name ))
46- return DSSNotebookContents (self .client , self .project_key , self .notebook_name , raw_contents )
45+ raw_content = self .client ._perform_json ("GET" , "/projects/%s/jupyter-notebooks/%s" % (self .project_key , self .notebook_name ))
46+ return DSSNotebookContent (self .client , self .project_key , self .notebook_name , raw_content )
4747
4848 def delete (self ):
4949 """
@@ -64,48 +64,48 @@ def get_object_discussions(self):
6464 """
6565 return DSSObjectDiscussions (self .client , self .project_key , "JUPYTER_NOTEBOOK" , self .notebook_name )
6666
67- class DSSNotebookContents (object ):
67+ class DSSNotebookContent (object ):
6868 """
69- Contents of a Jupyter Notebook. Do not create this directly, use :meth:`DSSJupyterNotebook.get_contents `
69+ Content of a Jupyter Notebook. Do not create this directly, use :meth:`DSSJupyterNotebook.get_content `
7070 """
7171
7272 """
7373 A Python/R/Scala notebook on the DSS instance
7474 """
75- def __init__ (self , client , project_key , notebook_name , contents ):
75+ def __init__ (self , client , project_key , notebook_name , content ):
7676 self .client = client
7777 self .project_key = project_key
7878 self .notebook_name = notebook_name
79- self .contents = contents
79+ self .content = content
8080
8181 def get_raw (self ):
8282 """
83- Get the contents of this Jupyter notebook (metadata, cells, nbformat)
84- :rtype: a dict containing the full contents of a notebook
83+ Get the content of this Jupyter notebook (metadata, cells, nbformat)
84+ :rtype: a dict containing the full content of a notebook
8585 """
86- return self .contents
86+ return self .content
8787
8888 def get_metadata (self ):
8989 """
9090 Get the metadata associated to this Jupyter notebook
9191 :rtype: dict with metadata
9292 """
93- return self .contents ["metadata" ]
93+ return self .content ["metadata" ]
9494
9595 def get_cells (self ):
9696 """
9797 Get the cells associated to this Jupyter notebook
9898 :rtype: list of cells
9999 """
100- return self .contents ["cells" ]
100+ return self .content ["cells" ]
101101
102102 def save (self ):
103103 """
104- Save the contents of this Jupyter notebook
104+ Save the content of this Jupyter notebook
105105 """
106106 return self .client ._perform_json ("PUT" ,
107107 "/projects/%s/jupyter-notebooks/%s" % (self .project_key , self .notebook_name ),
108- body = self .contents )
108+ body = self .content )
109109
110110class DSSNotebookSession (object ):
111111 """
0 commit comments