from jupyter_cms.loader import load_notebook
module_api = load_notebook('./module_nb.ipynb', inject_locals=dict(a=5))
print module_api.a
Variable 'a' will be in the locals of module_nb.ipynb and can be used with in the code there.
This allows us send anything to the loading notebooks before their code is executed.
You can now do:
Variable 'a' will be in the locals of module_nb.ipynb and can be used with in the code there. This allows us send anything to the loading notebooks before their code is executed.