Notebook.stop

Notebook.stop() → self

Stop a running notebook. If the notebook isn't running, an exception will be raised.

Returns

self (a Notebook)

Examples

username = "imathews"
workflow_name = "example_workflow_climate_analysis:x7kh"
notebook_name = "visualize_precipitation_trends:2f2v"

notebook = redivis.notebook(f"{username}.{workflow_name}.{notebook_name}")

notebook.run(wait_for_finish=False)
time.sleep(1)
notebook.stop() # this will stop the notebook after 1s

Last updated

Was this helpful?