--- title: export: nb2py keywords: fastai sidebar: home_sidebar summary: "Code that allows you to export a notebook (.ipynb) as a python script( .py) to a target folder." description: "Code that allows you to export a notebook (.ipynb) as a python script( .py) to a target folder." nb_path: "nbs/000_export.ipynb" ---
nb2py will allow you to convert the notebook (.ipynb) where the function is executed to a python script.
The conversion applies these rules:
This code is required to identify flags in the notebook. We are looking for #hide flags.
This code automatically gets the name of the notebook. It's been tested to work on Jupyter notebooks, Jupyter Lab and Google Colab.
This code is used when trying to save a file to google drive. We first need to mount the drive.