Jupyter Notebook
- class labstep.entities.jupyterNotebook.model.JupyterNotebook(data, user)
Represents an JupyterNotebook on Labstep.
- edit(name=OPTIONAL, status=OPTIONAL, data=OPTIONAL, extraParams={})
Edit an existing JupyterNotebook.
- Parameters:
name (str) – A display name.
status (str) – Server status (stopped, pending, started).
data (str) – JupyterNotebook ipyb JSON data.
- Returns:
An object representing the edited JupyterNotebook.
- Return type:
Example
my_jupyterNotebook = user.getJupyterNotebook("872b3e7e-e21f-4403-9ef3-3650fe0d86ba") my_jupyterNotebook.edit(data='{test: 42}')
- run()
Executes the JupyterNotebook
- newJupyterSchedule(frequency, extraParams={})
Schedule the Jupyter Notebook to run on a regular basis.
- Parameters:
frequency (str) – Frequency values can be ‘hourly’ | ‘daily’ | ‘weekly’.
If frequency is set to hourly, the Jupyter Notebook script will run every hour starting at the time Jupyter Notebook Schedule was created.
If frequency is set to daily, the Jupyter Notebook script will run everyday at midnight.
If frequency is set to weekly, the Jupyter Notebook script will run every monday at midnight.
- Returns:
An object representing the new Labstep JupyterSchedule.
- Return type:
Example
my_jupyter_notebook = user.getJupyterNotebook(17000) my_jupyter_shedule = my_jupyter_notebook.newJupyterSchedule(frequency='weekly')
- getJupyterSchedules(count=OPTIONAL, extraParams={})
Retrieve a list of a JupyterNotebook’s JupyterSchedules
- Parameters:
count (int) – The number of entities to return.
- Returns:
A list of JupyterSchedules.
- Return type:
List[
JupyterSchedule
]
Example
my_jupyter_notebook = user.getJupyterNotebook(17000) my_jupyter_shedules = my_jupyter_notebook.getJupyterSchedules()
- getJupyterSchedule(jupyter_schedule_guid)
Retrieve a specific JupyterSchedule entity.
- Parameters:
jupyter_schedule_guid (str) – The guid of the Jupyter Schedule entity to retrieve.
- Returns:
An object representing a Jupyter Schedule on Labstep.
- Return type:
Example
my_jupyter_notebook = user.getJupyterNotebook(17000) my_jupyter_shedules = my_jupyter_notebook.getJupyterSchedule(120000)
- delete()
Deletes the Labstep Entity (can be restored).
Example
- ::
experiment = user.getExperiment(17000) experiment.delete()
- export(rootPath, folderName=OPTIONAL)
Export the entity to the directory specified.
- Parameters:
path (str) – The path to the directory to save the experiment.
Example
experiment = user.getExperiment(17000) experiment.export('/my_folder')
- update()
Fetches the most up-to-date version of the entity from Labstep.
Jupyter Schedule
- class labstep.entities.jupyterSchedule.model.JupyterSchedule(data, user)
Represents a JupyterNotebook Schedule on Labstep.
- delete()
Delete an Jupyter Notebook Schedule entity.
Example
my_jupyter_notebook = user.getJupyterNotebook(17000) my_jupyter_shedule = my_jupyter_notebook.getJupyterSchedule(10000) my_jupyter_shedule.delete()
- edit(frequency=OPTIONAL, extraParams={})
Edit an existing Jupyter Notebook Schedule entity.
- Parameters:
frequency (str) – Frequency values can be ‘hourly’ | ‘daily’ | ‘weekly’.
If frequency is set to hourly, the Jupyter Notebook script will run every hour starting at the time Jupyter Notebook Schedule was created.
If frequency is set to daily, the Jupyter Notebook script will run everyday at midnight.
If frequency is set to weekly, the Jupyter Notebook script will run every monday at midnight.
- Returns:
An object representing the edited Jupyter Notebook Schedule.
- Return type:
Example
my_jupyter_notebook = user.getJupyterNotebook(17000) my_jupyter_shedule = my_jupyter_notebook.getJupyterSchedule(10000) my_jupyter_shedule.edit(frequency='hourly')