Skip to content

Python WASM Nodes

Python can run in WASM through several projects, each with trade-offs.

ProjectBinary SizeStartupCompatibility
Pyodide~10 MBSlowFull CPython
RustPython~2 MBFastMost Python
MicroPython~300 KBFastSubset
node.py
import json
def get_node():
"""Return the node definition."""
return {
"name": "wasm_python_uppercase",
"friendly_name": "Uppercase (Python)",
"description": "Converts a string to uppercase using Python",
"category": "Custom/Text",
"icon": "/flow/icons/text.svg",
"pins": [
{
"name": "exec_in",
"friendly_name": "",
"description": "Trigger execution",
"pin_type": "Input",
"data_type": "Execution",
},
{
"name": "exec_out",
"friendly_name": "",
"description": "Continue execution",
"pin_type": "Output",
"data_type": "Execution",
},
{
"name": "input",
"friendly_name": "Input",
"description": "The string to convert",
"pin_type": "Input",
"data_type": "String",
"default_value": "",
},
{
"name": "output",
"friendly_name": "Output",
"description": "The uppercase string",
"pin_type": "Output",
"data_type": "String",
},
],
"scores": {
"privacy": 0,
"security": 0,
"performance": 3, # Python is slower
"governance": 0,
"reliability": 0,
"cost": 1,
},
}
def run(context: dict) -> dict:
"""Execute the node logic."""
input_value = context.get("inputs", {}).get("input", "")
# Execute logic
output_value = input_value.upper()
return {
"outputs": {
"output": output_value,
},
"error": None,
}
  1. Large runtime — CPython interpreter is ~10MB
  2. Slow startup — Interpreter initialization takes time
  3. Limited I/O — WASM sandbox restricts file/network access
  4. Package compatibility — Not all PyPI packages work in WASM

For most use cases, consider:

If you need…Use
Fastest executionRust
Familiar syntaxTypeScript
Easy learning curveGo
Python specificallyWait for Python support

You can call Python scripts via the Run Script node in Flow-Like, which executes Python on the host system (not in WASM).

Python WASM support is on our roadmap. Watch the repository for updates:

📧 [email protected] for enterprise Python node development

WASM Nodes OverviewRust TemplateTypeScript Template