https://medium.com/media/a60eb3591c012c82df522064eee8175f/href Nod: Notebooks-on-Demand is an open-source JupyterLab extension that lets you jump into a Jupyter notebook from anywhere in a Python codebase. Just call notebook() from anywhere in your .py file, run it with nod , and a notebook opens at that point in the program with all your variables already loaded into the notebook state. When you’re done making edits, send them back to your original Python file with a click.