I am planning to use Jupyter Notebooks to generate reports. Reports would be generated by running a template notebook and then converting the resulting notebook to static HTML and image assets (using nbconvert if needed).
However, I am not sure how I can control the notebook execution programmatically. I would like to pass reporting data from the host Python interpreter to the notebook executor so that any passed data would be available as global or local variables in notebook cells.
Is it possible to programmatically inject variables into the notebook execution context? There is ExecutePreprocesser example, outside running and saving the notebook, it does not really describe all options what you can do with it.