# Node.py - Python for Node-RED?

**URL:** <https://discourse.nodered.org/t/node-py-python-for-node-red/53838>\
**Category:** General\
**Created:** [16 November 2021 17:10 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838 "2021-11-16T17:10:25Z")\
**Posts on this page:** 19\
**Page:** 3

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [23 November 2021 20:50 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/41 "2021-11-23T20:50:09Z")

</div>

Thanks for your input. But, given that you don't appear to favor Py vs JS for an ESP8266, I'll stick with microPython I've installed umqtt into the Lib and it seems to function adequately for it's application. 🙂

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [23 November 2021 20:53 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/42 "2021-11-23T20:53:41Z")

</div>

I would also like to see something like a Node.py for Node-RED, but I've experienced a lot of push-back on that suggestion. 😉

> [@TotallyInformation](#):
>
> I, for one, would love to see another flow-based visual programming tool come into existance, I think there is more than enough room for both.

It would be nice as TotallyInformation suggested, if there were another flow-base visual tool that was structured flexible enough to allow various Back-Ends to be added, as there will always be new programmings tools in the future.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 November 2021 20:58 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/43 "2021-11-23T20:58:29Z")

</div>

Can you elaborate what you think node-red would actually gain by writing it in python other than some syntactic differences and curly braces ?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 November 2021 21:27 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/44 "2021-11-23T21:27:01Z")

</div>

**Moderator's comment:** I'm wary of this topic going in circles and repeating the same talking points and becoming unproductive. There's little benefit having an endless discussion trading blows over what language is 'better'.

Please consider carefully whether you have something substantially new to add to the discussion regarding a Python runtime for Node-RED.

> [@bakman2](#):
>
> Can you elaborate what you think node-red would actually gain by writing it in python

The rationales for the suggestion have been stated through-out the thread. Ultimately it comes down to a personal preference for Python.

There are some domains (machine learning in particular) that have better support in Python than JavaScript - and having a native python runtime might be able to benefit from that.

> [@xytsrm](#):
>
> but I've experienced a lot of push-back on that suggestion. 😉

If you mean you haven't convinced the core development team to put aside JavaScript and rewrite everything in Python, then well, yes - that isn't something we're going to do based on this one suggestion.

That doesn't preclude anyone else from taking on the substantial task of producing a python runtime - keeping in mind you'd need to not just implement the runtime but a large number of nodes for it to be useful.

---

<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:** [23 November 2021 21:29 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/45 "2021-11-23T21:29:38Z")

</div>

From my perspective, and taking into account what I said about not simply translating from JS to Py, such a tool would open up flow-based, low-code programming to a very large community that is familiar with Python but not really with JavaScript.

It would also potentially get access to all of the science, engineering and data analytics libraries.

I would personally really love to see the power of Python's data management libraries wrapped into a visual programming tool making it relatively easy to analyse massive, complex CSV files for example.

I've tried all of the JavaScript libraries that claim to offer parity with the Python ones and they absolutely don't. Indeed, many of them don't work at all reliably.

Node-RED is great for IoT, home automation and the like, but it lacks the libraries for data analytics. Not the fault of Node-RED at all. Just that the libraries don't really exist for Node.js.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 November 2021 21:33 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/46 "2021-11-23T21:33:34Z")

</div>

> [@xytsrm](#):
>
> I would also like to see something like a Node.py for Node-RED

I m sorry, but I, for one, still do not understand exactly what you mean by a node.py for node-red. Node.js is a javascript runtime engine. Node red is written (mostly) in javascript and runs under node.js. So what exactly would node.py consist of?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 November 2021 21:34 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/47 "2021-11-23T21:34:41Z")

</div>

@Colin see this post which I think summarises it: [Node.py - Python for Node-RED? - #39 by mdkrieg](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/39)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 November 2021 21:36 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/48 "2021-11-23T21:36:24Z")

</div>

Once upon a time we did have one really keen person wanting to port Node-RED to Java as they considered it more enterprise acceptable, and I think they did start on it. That was about 7 years ago but I haven’t seen it yet.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [23 November 2021 21:46 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/49 "2021-11-23T21:46:32Z")

</div>

> [@knolleary](#):
>
> If you mean you haven't convinced the core development team to put aside JavaScript and rewrite everything in Python, then well, yes - that isn't something we're going to do based on this one suggestion.

In my one of my past posts I explicitly stated that I WASN'T suggesting abandoning JS, but PERHAPS Python could be added as and additional Back-End (e.g. Node.py). The "push-back" was no one seemed to like that idea either. When mdkrieg appeared to be suggesting the same thing I was just replying as to what my experiences were. I hope this clarifies the issue 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 November 2021 21:58 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/50 "2021-11-23T21:58:32Z")

</div>

Oh I see, so not a replacement for node.js, and not something that allows nodes written in python to be installed into the existing node-red.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [23 November 2021 22:11 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/51 "2021-11-23T22:11:14Z")

</div>

EXACTLY, sorry if I didn't make my intent clear.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [25 November 2021 08:34 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/52 "2021-11-25T08:34:13Z")

</div>

> [@knolleary](#):
>
> On the broader topic of python support, we do have established patterns for how nodes can interact with python scripts - allowing them to bridge between the two. That gives the best of both worlds - where there are particular modules that have been implemented in python and don't have equivalent node.js alternatives.

So at least I feel fully confident I selected this path already so long time ago - when I realized my advanced (already developed) Python AI scripts should be kept "as is" and only communicate the results back to NR when they happens. Has been working so well during the years, no need to think differently now

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 November 2021 08:44 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/53 "2021-11-25T08:44:57Z")

</div>

Indeed - if it works - don't fix it.

---

<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:** [25 November 2021 14:34 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/54 "2021-11-25T14:34:38Z")

</div>

You wont, of course, expect an Enterprise Architect such as myself to agree to _that_ statement I hope! 😀

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 November 2021 14:52 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/55 "2021-11-25T14:52:09Z")

</div>

Of course not ! It'll always be better after you have spent 24 months and $M on the project ... maybe.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [25 November 2021 15:08 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/56 "2021-11-25T15:08:10Z")

</div>

> [@dceejay](#):
>
> Indeed - if it works - don't fix it.

How do you expect people to give you $M's with an attitude like that?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 November 2021 15:12 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/57 "2021-11-25T15:12:02Z")

</div>

hence why I work in Open Source 🙂

---

<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:** [25 November 2021 15:53 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/58 "2021-11-25T15:53:30Z")

</div>

> [@dceejay](#):
>
> Of course not ! It'll always be better after you have spent 24 months and $M on the project ... maybe.

How else will I get my kids through Uni 😉

---

<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:** [24 January 2022 15:53 UTC](https://discourse.nodered.org/t/node-py-python-for-node-red/53838/59 "2022-01-24T15:53:46Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/node-py-python-for-node-red/53838.md?page=2)
