Search code examples
parametersjupyternbconvertpapermill

Running Jupyter Notebook with Different Configurations from CLI


I started to use Jupyter Notebook for my project and I use nbconvert to run it from the command line.

I want to know that is there any way to have a .ipynb file and run it with some command-line arguments or reading from stdin somewhere?

I read nbconvert documentation but I didn’t find out a way to do it.

If there is no way to do something like those, I want to know what is the best practice to have a single .ipynb file and run with different configurations?

Thank you in advance.


Solution

  • I found a tool named papermill for parameterizing and executing Jupyter Notebooks.

    Here's a a link to its documentation and how to parameterize your notebook.