Is it possible to run a notebook inside a script ?

43 views
Skip to first unread message

Ênio Júnior

unread,
Dec 28, 2018, 2:53:23 PM12/28/18
to Project Jupyter
Hello all ones!

I want to run a jupyter inside a .py script, but I cannot find anything in the documentation. Is it possible to do that?

Chris Holdgraf

unread,
Dec 28, 2018, 3:00:24 PM12/28/18
to jup...@googlegroups.com
Check out the papermill project, which has functionality for running notebook files! https://github.com/nteract/papermill

Sent from my phone, apologies for the curtness and type-os

On Fri, Dec 28, 2018, 8:53 PM Ênio Júnior <eniocs...@gmail.com wrote:
Hello all ones!

I want to run a jupyter inside a .py script, but I cannot find anything in the documentation. Is it possible to do that?

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/9e0a4f50-ccc1-47e5-8c49-6ce777d1453a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthias Geier

unread,
Dec 29, 2018, 11:21:54 AM12/29/18
to jup...@googlegroups.com
On Fri, Dec 28, 2018 at 8:53 PM Ênio Júnior wrote:
>
> Hello all ones!
>
> I want to run a jupyter inside a .py script, but I cannot find anything in the documentation. Is it possible to do that?

You can use the module "nbconvert" for this, more specifically,
"nbconvert.preprocessors.ExecutePreprocessor":

https://nbconvert.readthedocs.io/en/latest/execute_api.html#executing-notebooks-using-the-python-api-interface

cheers,
Matthias

Alun Champion

unread,
Dec 29, 2018, 11:26:09 AM12/29/18
to Project Jupyter
Reply all
Reply to author
Forward
0 new messages