Skip to content

Disable "save widget state automatically" via notebook command? #137

@kolibril13

Description

@kolibril13

I'm looking for a snippet similar to

from ipylab import JupyterFrontEnd
app = JupyterFrontEnd()
app.commands.execute('notebook:insert-cell-below')

but instead of insert-cell-below, I would like to disable "save widget state automatically".
That way, I could enable "save widget state automatically" by default for all my notebooks, and exclude some notebooks where I don't want to save widget states.
Here's a list of notebook commands that I found, but I don't know which one is right for disabling saving the widget state
https://github.com/jupyterlab/jupyterlab/blob/49f6ec28b738243a53a947d544bebafafcbd4a73/packages/notebook-extension/src/index.ts#L136-L325

Looking forward to suggestions and ideas!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions