Jupytext¶
Automatically convert notebook files to .py files
Install¶
Settings¶
In repo add jupytext.toml:
Settings in Jupyter Lab
Go to Settings > Settings Editor.
In the Jupytext section, add the following:
This tells JupyterLab to automatically pair.ipynbnotebooks with.py(Python script) files with thelightformat.
Sync¶
Then manually sync all notebook files in current and subfolders to .py:
.py file is shown with the notebook icon. We can also manually convert to notebook or back using: