# \#python

**URL:** https://discourse.nodered.org/tag/python/54.md

[Latest](https://discourse.nodered.org/latest.md) · [Categories](https://discourse.nodered.org/categories.md) · [Tags](https://discourse.nodered.org/tags.md)

---

## [py-RED - WIP Python implementation of Node-RED](https://discourse.nodered.org/t/py-red-wip-python-implementation-of-node-red/96021)

<div class="topic-metadata">

**Author:** [@mdkrieg](https://discourse.nodered.org/u/mdkrieg)\
**Replies:** 9\
**Last updated:** [8 April 2025 17:28 UTC](https://discourse.nodered.org/t/py-red-wip-python-implementation-of-node-red/96021 "2025-04-08T17:28:53Z")

</div>

Hello, So basically I just grabbed the editor-client, served it over Flask and started making things work. NOTE: This is very early development and does nothing useful at the moment! I'm posting here for discussion p…

---

## [FlowFuse: run python script with library dependancies that do not exist](https://discourse.nodered.org/t/flowfuse-run-python-script-with-library-dependancies-that-do-not-exist/90755)

<div class="topic-metadata">

**Author:** [@nsakellion](https://discourse.nodered.org/u/nsakellion)\
**Replies:** 1\
**Last updated:** [10 January 2025 15:27 UTC](https://discourse.nodered.org/t/flowfuse-run-python-script-with-library-dependancies-that-do-not-exist/90755 "2025-01-10T15:27:41Z")

</div>

Greetings, I have an instance in FlowFuse where I need to execute some Python scripts that use libraries like pandas, sklearn, and joblib amongst others. However, I get the error: "ModuleNotFoundError: No module named …

---

## [Python equivalent of flow.set() and flow.get()](https://discourse.nodered.org/t/python-equivalent-of-flow-set-and-flow-get/89187)

<div class="topic-metadata">

**Author:** [@Ouagadougou](https://discourse.nodered.org/u/Ouagadougou)\
**Replies:** 13\
**Last updated:** [3 July 2024 16:27 UTC](https://discourse.nodered.org/t/python-equivalent-of-flow-set-and-flow-get/89187 "2024-07-03T16:27:54Z")

</div>

Hi. I'm new to Node Red. Sorry, I'm using Python... I want to be able to share variables between nodes and all I can find is how to get data from sys.argv (so sent as a trigger from another node). My triggers to various …

---

## [How to receive MQTT data using Subscribe and callback](https://discourse.nodered.org/t/how-to-receive-mqtt-data-using-subscribe-and-callback/86596)

<div class="topic-metadata">

**Author:** [@badflash](https://discourse.nodered.org/u/badflash)\
**Replies:** 21\
**Last updated:** [22 March 2024 13:48 UTC](https://discourse.nodered.org/t/how-to-receive-mqtt-data-using-subscribe-and-callback/86596 "2024-03-22T13:48:48Z")

</div>

I am have trouble figuring out how to implement the subscribe and callback feature of MQTT in micropython. The examples I've found aren't helping me figure out how to do it. I'm a new guy. I am using a Pi Pico W, HiveMQ…

---

## [Python3-function calulation fail](https://discourse.nodered.org/t/python3-function-calulation-fail/86011)

<div class="topic-metadata">

**Author:** [@lillebjorn559](https://discourse.nodered.org/u/lillebjorn559)\
**Replies:** 4\
**Last updated:** [4 March 2024 05:51 UTC](https://discourse.nodered.org/t/python3-function-calulation-fail/86011 "2024-03-04T05:51:33Z")

</div>

Hi, I'm seeking help with this code I have. Point 1: When I provide a number input via ui.text.input to the Python 3 function, it only remembers it until I provide input from another ui.text.input. Point 2: When my M…

---

## [Send files or data via internet](https://discourse.nodered.org/t/send-files-or-data-via-internet/81277)

<div class="topic-metadata">

**Author:** [@issambfs1](https://discourse.nodered.org/u/issambfs1)\
**Replies:** 7\
**Last updated:** [13 September 2023 16:04 UTC](https://discourse.nodered.org/t/send-files-or-data-via-internet/81277 "2023-09-13T16:04:00Z")

</div>

is there any way to send files size of 2-5mb from "raspberry pi zero w " to a cloud drive or to a server ? i don't care about security !

---

## [Template node and python](https://discourse.nodered.org/t/template-node-and-python/81146)

<div class="topic-metadata">

**Author:** [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)\
**Replies:** 14\
**Last updated:** [8 September 2023 17:47 UTC](https://discourse.nodered.org/t/template-node-and-python/81146 "2023-09-08T17:47:48Z")

</div>

Hi, I need to use python to run a script, and I'm scrambling to solve this two issues. I need to have the script within node-red for several reasons. Actually, I wrote the python script within the template node, then via…

---

## [How to find the size of mqtt data in python](https://discourse.nodered.org/t/how-to-find-the-size-of-mqtt-data-in-python/78862)

<div class="topic-metadata">

**Author:** [@Johnson](https://discourse.nodered.org/u/Johnson)\
**Replies:** 6\
**Last updated:** [5 June 2023 19:00 UTC](https://discourse.nodered.org/t/how-to-find-the-size-of-mqtt-data-in-python/78862 "2023-06-05T19:00:36Z")

</div>

Hi, I need to find the packet size of a mqtt data in python. My question is, how can i find the mqtt packet size which include the control header, packet length, variable length header and payload . At the moment i am…

---

## [How to pass json object as input to python script through exec node?](https://discourse.nodered.org/t/how-to-pass-json-object-as-input-to-python-script-through-exec-node/77536)

<div class="topic-metadata">

**Author:** [@Satyam](https://discourse.nodered.org/u/Satyam)\
**Replies:** 8\
**Last updated:** [19 April 2023 14:24 UTC](https://discourse.nodered.org/t/how-to-pass-json-object-as-input-to-python-script-through-exec-node/77536 "2023-04-19T14:24:07Z")

</div>

please find the node-red code below: \[ { "id": "1ff7a51a41da7b57", "type": "tab", "label": "Flow 2", "disabled": false, "info": "", "env": \[\] }, { "id"…

---

## [Python Output - Blinking Seperate Neopixels](https://discourse.nodered.org/t/python-output-blinking-seperate-neopixels/76477)

<div class="topic-metadata">

**Author:** [@dandspach](https://discourse.nodered.org/u/dandspach)\
**Replies:** 5\
**Last updated:** [13 March 2023 12:08 UTC](https://discourse.nodered.org/t/python-output-blinking-seperate-neopixels/76477 "2023-03-13T12:08:01Z")

</div>

problem: how to code Python in Node Red output to blink separate Neopixels I have the following output to a .py file, which is run by a crontab at certain intervals. Currently, lighting works perfect and all leds are …

---

## [Is it possible to give a parameter to a running python script?](https://discourse.nodered.org/t/is-it-possible-to-give-a-parameter-to-a-running-python-script/76385)

<div class="topic-metadata">

**Author:** [@DeWoAlliSeged7](https://discourse.nodered.org/u/DeWoAlliSeged7)\
**Replies:** 3\
**Last updated:** [10 March 2023 13:22 UTC](https://discourse.nodered.org/t/is-it-possible-to-give-a-parameter-to-a-running-python-script/76385 "2023-03-10T13:22:38Z")

</div>

Hello Is it possible to give a parameter to a running python script ? I would like to change a variable. thx in advance Simon

---

## [Pythonshell shows error but the script is running in the ssh box](https://discourse.nodered.org/t/pythonshell-shows-error-but-the-script-is-running-in-the-ssh-box/75979)

<div class="topic-metadata">

**Author:** [@DeWoAlliSeged7](https://discourse.nodered.org/u/DeWoAlliSeged7)\
**Replies:** 2\
**Last updated:** [2 March 2023 10:18 UTC](https://discourse.nodered.org/t/pythonshell-shows-error-but-the-script-is-running-in-the-ssh-box/75979 "2023-03-02T10:18:27Z")

</div>

Hello I would like to run a python script with Node-RED. I added the pythonshell palett. I can run the script in the ssh box but if i start the script with the pythonshell i get the error: (It is two times the same…

---

## [Python function return variable](https://discourse.nodered.org/t/python-function-return-variable/73928)

<div class="topic-metadata">

**Author:** [@superlogan72](https://discourse.nodered.org/u/superlogan72)\
**Replies:** 23\
**Last updated:** [27 January 2023 16:16 UTC](https://discourse.nodered.org/t/python-function-return-variable/73928 "2023-01-27T16:16:17Z")

</div>

Hello using python-function i'm not able to get get the variable value import sys sys.path.append("/home/pi/.local/lib/python3.9/site-packages") from pigpio\_encoder.rotary import Rotary import threading import time glo…

---

## [Multiple Arguments to Python Shell](https://discourse.nodered.org/t/multiple-arguments-to-python-shell/74239)

<div class="topic-metadata">

**Author:** [@Rauth](https://discourse.nodered.org/u/Rauth)\
**Replies:** 4\
**Last updated:** [27 January 2023 14:17 UTC](https://discourse.nodered.org/t/multiple-arguments-to-python-shell/74239 "2023-01-27T14:17:47Z")

</div>

Hello, I'm a beginner on both JS and Python, so I can't get too deep into the weeds on the script side. Hopefully I can provide enough context so that my question makes sense. I am trying to run a single pass python sc…

---

## [Node-red python function](https://discourse.nodered.org/t/node-red-python-function/73924)

<div class="topic-metadata">

**Author:** [@superlogan72](https://discourse.nodered.org/u/superlogan72)\
**Replies:** 1\
**Last updated:** [19 January 2023 16:12 UTC](https://discourse.nodered.org/t/node-red-python-function/73924 "2023-01-19T16:12:35Z")

</div>

Hello I have a problem but i'm unable to find the solution. Using the python function i do from pigpio\_encoder.rotary import Rotary But i get the error : no module named pigpio\_encoder, I have this module if i impor…
