Using Tightener automation glue to connect Jupyter Notebooks with InDesign or InDesign Server and interactively build scripts in ExtendScript or UXPScript.
Jump to 08:00 to see skip the intro and directly see Jupyter Notebook interacting with InDesign
More info: https://coppieters.nz/?p=593