# Sending data to Jupyter Notebook and getting output back

**URL:** <https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794>\
**Category:** General\
**Created:** [16 August 2021 14:20 UTC](https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794 "2021-08-16T14:20:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aryans14](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@aryans14](https://discourse.nodered.org/u/aryans14)\
**Post date:** [16 August 2021 14:20 UTC](https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794/1 "2021-08-16T14:20:08Z")

</div>

I want to pass some set of values to Jupyter Notebook (I already done coding in a notebook there) where a function will take these values and return me the output. I want to get this data back in Node Red to display.

Any idea , how can i achieve this?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [16 August 2021 20:06 UTC](https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794/2 "2021-08-16T20:06:27Z")

</div>

I think it depends on what is hosting the notebook. For example, using Jupyter Lab, there is a server component that has a defined REST API that you may be able to use:

> **[GitHub - jupyter-server/jupyter\_server: The backend—i.e. core services, APIs,...](https://github.com/jupyter-server/jupyter_server)**
>
> The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications. - GitHub - jupyter-server/jupyter\_server: The backend—i.e. core services, APIs, and REST endpoints—to Jupyter w...

---

<div class="post-metadata">

**Author:** ![aryans14](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@aryans14](https://discourse.nodered.org/u/aryans14)\
**Post date:** [16 August 2021 20:18 UTC](https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794/3 "2021-08-16T20:18:33Z")

</div>

I am using Jupyter Notebook Anaconda Distribution installed on my PC. Everything is on localhost.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 August 2021 09:38 UTC](https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794/4 "2021-08-17T09:38:23Z")

</div>

In that case, Anaconda manages running the server for you. I think that you will need to do some more reading about Jupyter server and how to interact with it. If it supports what you want to do via a REST API or websockets or even MQTT, or indeed pretty much any network protocol, then Node-RED will be able to interact with it.

So if you can sort out the Jupyter Server side, by all means come back to us and we should be able to help with the rest.

Personally I've given up on Anaconda, it is far too complex and I found it unreliable for me.

When I discovered that VScode has a Jupyter Notebook capability without any of the complexity of Anaconda (and without the licensing issues), I just use that. Just note that some of the fancy new features and extension currently require the "insiders" version of VSCode (which you can run along side your normal version). You can even use different kernels very easily such as the node.js kernel 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 October 2021 09:39 UTC](https://discourse.nodered.org/t/sending-data-to-jupyter-notebook-and-getting-output-back/49794/5 "2021-10-16T09:39:12Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
