{"id":41272152,"url":"https://github.com/404background/node-red-contrib-python-venv","last_synced_at":"2026-01-23T02:25:59.507Z","repository":{"id":228774078,"uuid":"774229547","full_name":"404background/node-red-contrib-python-venv","owner":"404background","description":"Node for python virtual environment","archived":false,"fork":false,"pushed_at":"2025-10-18T05:31:17.000Z","size":1241,"stargazers_count":10,"open_issues_count":8,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-14T00:49:14.419Z","etag":null,"topics":["node-red","nodejs","python","python-venv"],"latest_commit_sha":null,"homepage":"https://flows.nodered.org/node/@background404/node-red-contrib-python-venv","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/404background.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["404background"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-03-19T07:12:24.000Z","updated_at":"2025-07-02T04:41:48.000Z","dependencies_parsed_at":"2024-06-26T18:05:20.246Z","dependency_job_id":"55bbf938-13d2-4a7d-a479-8651da4ab865","html_url":"https://github.com/404background/node-red-contrib-python-venv","commit_stats":null,"previous_names":["404background/node-red-contrib-python-venv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/404background/node-red-contrib-python-venv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/404background%2Fnode-red-contrib-python-venv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/404background%2Fnode-red-contrib-python-venv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/404background%2Fnode-red-contrib-python-venv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/404background%2Fnode-red-contrib-python-venv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/404background","download_url":"https://codeload.github.com/404background/node-red-contrib-python-venv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/404background%2Fnode-red-contrib-python-venv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28678274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-red","nodejs","python","python-venv"],"created_at":"2026-01-23T02:25:58.300Z","updated_at":"2026-01-23T02:25:59.497Z","avatar_url":"https://github.com/404background.png","language":"JavaScript","funding_links":["https://github.com/sponsors/404background"],"categories":[],"sub_categories":[],"readme":"# node-red-contrib-python-venv\n\nNode to use Python virtual environment in Node-RED\n\n[![GitHub Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=ff69b4)](https://github.com/sponsors/404background)\n[![npm version](https://img.shields.io/npm/v/@background404/node-red-contrib-python-venv?style=flat-square)](https://www.npmjs.com/package/@background404/node-red-contrib-python-venv)\n[![npm downloads](https://img.shields.io/npm/dm/@background404/node-red-contrib-python-venv?style=flat-square)](https://www.npmjs.com/package/@background404/node-red-contrib-python-venv)\n[![GitHub Discussions](https://img.shields.io/github/discussions/404background/node-red-contrib-python-venv?color=blue\u0026label=Discussions\u0026logo=github)](https://github.com/404background/node-red-contrib-python-venv/discussions)\n\nIf you would like to find a sample flow or have questions, please visit [GitHub Discussions](https://github.com/404background/node-red-contrib-python-venv/discussions) page!\n\n## Overview\n\nWith this node, you can run Python in Python's virtual environments in Node-RED.\n\nWhen you install this node, python virtual environment (pyenv folder) is also created.  \nYou can run python(.exe) or pip(.exe) in that environment.\n\nSample flows are in the examples folder.  \n![sample-flow.png](./img/sample-flow.png)\n\n## Nodes\n\n### venv node\n\npython(.exe) is in the ./pyenv/Scripts/python.exe or Python virtual environment you have added.\n\nWrite your Python code in the node.  \nThe program is saved in the virtual environment and executed.\n\n![venv-node.jpg](./img/venv-node.png)\n\nYou can access Node-RED messages like `print(msg['payload'])`.\n\n![msg-property.png](./img/msg-property.png)\n\nYou can also access flow and global objects like `print(node['flow']['payload'])`, `print(node['global']['payload'])`.\n\n![msg-property-flow-global.png](./img/msg-property-flow-global.png)\n\nThe number of running nodes is displayed in the status.\n\n![running-status.png](./img/running-status.png)\n\nThe venv node stops execution when `msg.kill` or `msg.terminate` is set to `true`, aligning its behavior with Node-RED's `exec` node.\n\n### pip node\n\npip(.exe) is in the ./pyenv/Scripts/pip.exe or Python virtual environment you have added.\n\nYou can run pip commands like install, uninstall, list.  \nSelect the commands.\n\n![pip-node.jpg](./img/pip-node.png)\n\nThis node uses pip in the virtual environment, so it is different from the existing Python environment packages.  \nPlease compare.\n\n![pip-list.jpg](./img/pip-list.jpg)\n\n### venv-exec\n\nThis node can execute executable files in Scripts or bin folder.\n\n![venv-exec.jpg](./img/venv-exec.jpg)\n\nYou can see the name of the executable in List Executables mode.  \nThen you can execute it with arguments in Execute mode.\n\n![venv-exec-list.jpg](./img/venv-exec-list.jpg)\n![venv-exec-execute.jpg](./img/venv-exec-execute.jpg)\n\nThe venv-exec node stops execution when either `msg.kill` or `msg.terminate` is set to `true`, aligning its behavior with Node-RED's `exec` node.\n\n### venv-config (config node)\n\nYou can create and switch between multiple Python virtual environments.  \nYou need to add and set the name of the virtual environment.  \nYou can also specify the Python version **only in Windows**.  \n![venv-config.png](./img/venv-config.png)\n\nWhen a configuration node is deleted, the virtual environment with that name is also deleted.  \nIf you add a node with the same venv Name, only one virtual environment will be created.\n\nThe nodes can be executed by creating virtual environments even if the venv Name contains spaces or is an absolute path.  \n![venv-config-abspath.png](./img/venv-config-abspath.png)\n\n## Other Links\n\n### Technical Articles\n\nI refer to \"Creating Nodes\" page of Node-RED.  \n\u003chttps://nodered.org/docs/creating-nodes/\u003e\n\nMy article: Creating Nodes for Node-RED Part 1 (python-venv)  \n\u003chttps://404background.com/en/programming/creating-nodes-1/\u003e\n\nMy article: python-venv node development history (2024)  \n\u003chttps://qiita.com/background/items/3244fc1b70cc454befef\u003e  \n\n### Nodes created based on this node\n\nvoicevox-core node: Node that outputs Japanese audio files using voicevox-core  \n\u003chttps://flows.nodered.org/node/@background404/node-red-contrib-voicevox-core\u003e\n\nwhisper node: Node to transcribe text using Open AI's Whisper  \n\u003chttps://flows.nodered.org/node/@background404/node-red-contrib-whisper\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F404background%2Fnode-red-contrib-python-venv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F404background%2Fnode-red-contrib-python-venv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F404background%2Fnode-red-contrib-python-venv/lists"}