I know I can call
jupyter nbconvert --execute --to html notebook.ipynb
from shell, or do a system call from Python:
import os