@background404/node-red-contrib-python-venv

0.0.2 • Public • Published

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

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

Readme

Keywords

Package Sidebar

Install

npm i @background404/node-red-contrib-python-venv

Weekly Downloads

14

Version

0.0.2

License

MIT

Unpacked Size

176 kB

Total Files

14

Last publish

Collaborators

  • background404