Skip to content

Alkarex/node-red-contrib-python-venv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-red-contrib-python-venv

Node for python virtual environment

Overview

With this node, you can run Python programs.

When you install this node, python virtual environment (pyenv folder) is also created.
You can run python.exe or pip.exe in that environment.

Test Case

Windows 10

  • Node.js: v20.10.0
  • npm: 9.1.3
  • Python: 3.8.3
  • pip: 24.0

Raspberry Pi

  • Debian bookworm
  • Node.js: v18.19.0
  • npm: 9.2.0
  • Python: 3.11.2
  • pip: 24.0

Sample flows are in the examples folder.
sample-flow.jpg

Nodes

venv node

python.exe is in the ./pyenv/Scripts/python.exe

Write your Python code in the node.
The program is saved in a tmp folder and executed.

venv-node.jpg

You can access Node-RED messages like print(msg['payload']).

msg-property-flow.png

msg-property.png

msg-property-inject.png

pip node

pip.exe is in the ./pyenv/Scripts/pip.exe

You can run pip commands like install, uninstall, list, etc.
Select the options.

pip-node.jpg

This node uses pip in the virtual environment, so it is different from the existing Python environment packages.
Please compare.

pip-list.jpg

About

Node for python virtual environment

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 54.2%
  • HTML 34.3%
  • Python 11.5%