Opening a notebook with parameters to be set in the first code snippet

I would like to open an existing notebook and that some parameters will be set in that notebook (possibly in the first code snippet)
is this possible?


Maybe the screenshot will make it clearer

Does it need to be in the URL that you are passing the settings for the parameters? If not, Papermill, would work well for you.

I see you’re using the standard jupyter notebook UI. It’s possible to write a small JS extension that modifies the content of cells whenever the notebook is loaded, as described in the following thread:

It’s also possible to do this in Jupyterlab, but it uses a differnet syntax for plugin definitions

As a simpler alternative, you can use the pre/post_save hooks in your to insert/modify cells before they’re written to disk. A downside of this is that the changes will only be visible after the notebook has been saved (and reloaded by the user) at least once

I had the same requirement a while back:

And wrote a small notebook extension: