Execute custom Python scripts in a sandboxed environment.
core.script.run_python
action to execute Python code in a sandboxed WebAssembly environment using Pyodide.
This ensures isolation from the host system while providing access to popular Python libraries.
You can include 3rd-party Python packages in your script by adding them to the dependencies
field.
main
allow_network: true
when using dependenciesField | Type | Description | Required |
---|---|---|---|
script | string | Python code with at least one function | ✅ |
inputs | object | Dictionary mapping parameter names to values for function arguments | ❌ |
dependencies | array | List of Python packages to install | ❌ |
timeout_seconds | integer | Maximum execution time (default: 30) | ❌ |
allow_network | boolean | Enable network access for package downloads (default: false) | ❌ |
inputs
are passed as function arguments into the main functionNone
def main(name, age):
but inputs include {"name": "Alice", "age": 30, "city": "NYC"}
, the city
field will be ignored without error.Run Python script
action.