Skip to main content

How to download your JupyterHub Notebook as Python script file?

Let's see how to download a notebook into an executable Python script!

David Bina avatar
Written by David Bina
Updated over 3 weeks ago

Context


One of the multiple services and benefits WEkEO offers to users is the WEkEO JupyterHub, where users can run notebooks (including from our Jupyter Catalogue) and their own scripts.

You might need to run your work on your computer or a virtual machine, or pass the script to someone else. Good news! There is a simple way to transform your notebook into a Python file in order to download it locally.

In this article, we'll show how you can export a Python script from the WEkEO JupyterHub! πŸ’ͺ

Export Python scripts from JupyterHub


To export a notebook as a Python file from JupyterHub, follow these steps:

  1. Click on File

  2. Click on Export Notebook As...

  3. Click on Export to Executable Script

All non-code cells (Markdown, raw text) will be put in #comment in the script file.

And tadaaaa!

Your Python file will be ready for execution! πŸ˜ƒ

What's next?


If you want to know more about the WEkEO JupyterHub and its computing resources, here are some articles:

Additional resources can be found in our Help Center. Should you require further assistance or wish to provide feedback, feel free to contact us through a chat session available in the bottom right corner of the page.

Did this answer your question?