Parameterizing Multiple Notebooks

I’m trying to see if there is a community solution regarding parameterizing multiple notebooks or examples of setting parameters in a folder / high-level context that is then passed to multiple notebooks.

Any suggestions would be appreciated.


I’m guessing you’re talking about papermill parameterization. You could use the Python API and parameterize several notebooks at the same time and then execute them. See here.

Alternatively, you could use Ploomber (disclaimer: I’m the author), which builds on top of papermill for building multi-stage pipelines. your pipeline (a YAML file), would look like this:

source: notebook-a.ipynb
product: output-a.ipynb
   my_param: a

source: notebook-b.ipynb
product: output-b.ipynb
   my_param: a

Happy to provide more details about Ploomber if you’re interested!


Gotcha this is interesting, have you considered how Jupyter Books config.yml could be used to pass in additional arguments? Making it more configurable within that project itself?

I’m not familiar with jupyter books but I will take a look!