JUPYTEXT

Jupytext is an datalab extension that paires your ipython notebook with a python script. This way, you can easily use the script as if you were coding directly from it

How to

For starter, you have your whole environment, with your ipython notebook, ready to be use as a script

cookbook15 1

After that, you go to command and search for jupytext. You’ll see all the jupytext actions.

cookbook15 2

Then select a pairing option (Pair Notebook with light Script). Going to your files, you’ll see

cookbook15 3

You’ll finally end up with this python script

cookbook15 4

Use

Jupytext can be essential when, after have worked on an Ipython Notebook, in order to deploy your application and build an appropriated Dockerfile, copying the paired .py file of the .ipynb in the Dockerfile.