exporter is a simple package that helps to export Jupyter notebooks as a Python script. Add #export or # export comments anywhere in the notebook cell you want to export as a Python script. Cells in the same notebook will be exported to the same Python script.
The best part of the exporter, it will not create any artifacts when you export cells.
pip install exporter
Check PyPI for all the versions available.
- Add #export or # export comments to cells you want to export.
-
- Option 1: Use command line.
For all the options:
exporter notebook_path.ipynb output_path.py
exporter --help
- Option 2: Use Python function.
from exporter import export export("notebook_path.ipynb","oytput_path.py")
- Option 1: Use command line.