JupyterLab services is for use in the browser, that’s what JupyterLab uses
to talk to these APIs. If you are already in the existing pre-Lab notebook
and want to run code on the current kernel, the API you are after is:

Jupyter.notebook.kernel.execute("some code", callbacks)

-MinRK
​

On Fri, Nov 11, 2016 at 4:19 PM, Christopher Brooks <brook...@umich.edu>
wrote:

> Hi,
>
> I'm trying to do a bit of rapid prototyping of a jupyter javascript
> extension which invokes services against a python kernel. The docs take
> some serious time, but what I've groked is that there are a set of REST-based
> services
> <http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml#/sessions>
> which I call, but it seems like these services do not allow me to push code
> to the kernel, just identify which kernels and sessions are available. It
> seems instead that once I have identified a kernel, I can use this wire
> protocol <https://jupyter-client.readthedocs.io/en/latest/messaging.html>
> for interaction with the kernel. However, I'm unclear which endpoint to
> push messages to and feel like there must be a browser-based Javascript
> library available for this purpose. COMMs caught my eye, but again, it
> seems like it should be more straight forward to push some python strings
> to a kernel and observe the results. The JupyterLab Services
> <https://github.com/jupyterlab/services> looked promising, but it's all
> Node.jsified, which makes me think this is the wrong tree to bark down.
>
> Maybe someone could give me a gentle nudge in the right direction?
>
> (I sort of expected something as trivial as an IPython.Notebook.execute("
> somecode")....)
>
> Regards,
>
> Chris
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/4823f311-80a5-4597-abbd-fc86b17bf0ea%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/4823f311-80a5-4597-abbd-fc86b17bf0ea%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAHNn8BWg6LKLFNr8iC3guVKO_Zv6Thm15DS%3DOp712Pu-N02HtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to