Using Jupyter API to run an ipynb

2,305 views
Skip to first unread message

saso...@colorado.edu

unread,
Feb 16, 2016, 5:38:13 PM2/16/16
to Project Jupyter
Hi,
I am trying to use the Jupyter API to run a Jupyter Notebook. For this, I looked up the API, but I could not find a way to run the notebook. Am I missing something?
I am currently referring this:

Thanks,
Saurabh

MinRK

unread,
Feb 17, 2016, 6:58:10 AM2/17/16
to jup...@googlegroups.com
There isn't an API for running a notebook. There is a `contents` API for reading/writing files (including notebooks) and a `kernels` API for starting kernels and running code via websockets. To run a notebook requires using both of these APIs to open the notebook, connect a kernel, and then request execution of each cell via a websocket request.

-MinRK

--
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/04ce8f33-c64f-4bc7-a155-95005344ed99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

saso...@colorado.edu

unread,
Feb 17, 2016, 1:07:08 PM2/17/16
to Project Jupyter
Thanks for the reply. Are there any code samples I could refer to running the notebook using Websockets?
Thanks,
Saurabh

Thomas Kluyver

unread,
Feb 17, 2016, 1:35:52 PM2/17/16
to Project Jupyter
On 17 February 2016 at 18:07, <saso...@colorado.edu> wrote:
Thanks for the reply. Are there any code samples I could refer to running the notebook using Websockets?

What are you trying to achieve? It might be simpler to fetch the notebook and run it locally (nbconvert has machinery to execute a notebook).

Thomas

saso...@colorado.edu

unread,
Feb 17, 2016, 1:38:10 PM2/17/16
to Project Jupyter
I am trying to integrate an notebook in my own project. Basically, I just want to be able to read an ipynb, and run code. I will look into nbconvert as well.

Thanks,
Saurabh

Thomas Kluyver

unread,
Feb 17, 2016, 1:58:05 PM2/17/16
to Project Jupyter
On 17 February 2016 at 18:38, <saso...@colorado.edu> wrote:
I am trying to integrate an notebook in my own project. Basically, I just want to be able to read an ipynb, and run code. I will look into nbconvert as well.

The docs here describe executing a notebook from Python or from the command line:
http://nbconvert.readthedocs.org/en/latest/execute_api.html
Reply all
Reply to author
Forward
0 new messages