Running Jupyter Notebooks Programmatically in Python

I am looking to embed fully-featured jupyter notebooks into my app, and would like to be able to run cells programmatically for 2 reasons:

  1. So I can extract the outputs of cells and render them in my app separate from the notebook runtime.
  2. Build a custom notebook renderer

For example how has made their own notebook renderer with custom buttons that allow you to export outputs into dashboards. Especially how they allow operation as a traditional notebook while I am editing (interacting with cells in the order I like), then doing full notebook executions and output capature for rendering to the dashboard, making the notebook “headless” (I believe I can do this part with nbconvert).

I guess this might be broken down more to parsing notebook files and managing an ipython runtime.

Are there any pointers on how to make custom notebook renderers? I’m a bit stuck when googling as I’m sure I’m not using the right terms :stuck_out_tongue: