You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _snippets/integrations/builtin/core-nodes/code-node.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ The Code node editing environment supports time-saving and useful keyboard short
58
58
59
59
## Python (Pyodide - legacy)
60
60
61
-
Pyodide is a legacy feature. Future versions of n8n will no longer support this feature.
61
+
Pyodide is a legacy feature. n8n v2 no longer supports this feature.
62
62
63
63
n8n added Python support in version 1.0. It doesn't include a Python executable. Instead, n8n provides Python support using [Pyodide](https://pyodide.org/en/stable/), which is a port of CPython to WebAssembly. This limits the available Python packages to the [Packages included with Pyodide](https://pyodide.org/en/stable/usage/packages-in-pyodide.html#packages-in-pyodide). n8n downloads the package automatically the first time you use it.
64
64
@@ -82,9 +82,9 @@ You can't access the file system or make HTTP requests. Use the following nodes
82
82
*[Read/Write File From Disk](/integrations/builtin/core-nodes/n8n-nodes-base.readwritefile.md)
n8n added native Python support using task runners (beta) in version 1.111.0.
87
+
n8n added native Python support using task runners in version 1.111.0. This feature is stable as of n8n v2.
88
88
89
89
Main differences from Pyodide:
90
90
@@ -93,9 +93,7 @@ Main differences from Pyodide:
93
93
- Native Python denies insecure built-ins by default. See [task runners environment variables](/hosting/configuration/environment-variables/task-runners.md) for more details.
94
94
- Unlike Pyodide, which accepts dot access notation, for example, `item.json.myNewField`, native Python only accepts bracket access notation, for example, `item["json"]["my_new_field"]`. There may be other minor syntax differences where Pyodide accepts constructs that aren't legal in native Python.
95
95
96
-
Keep in mind upgrading to native Python is a breaking change, so you may need to adjust your Python scripts to use the native Python runner.
97
-
98
-
This feature is in beta and is subject to change. As it becomes stable, n8n will roll it out progressively to n8n cloud users during 2025. Self-hosting users can [try it out](/hosting/configuration/task-runners.md) and provide feedback.
96
+
Upgrading to native Python is a breaking change, so you may need to adjust your Python scripts to use the native Python runner.
Copy file name to clipboardExpand all lines: docs/2-0-breaking-changes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ Starting with v2.0, the main `n8nio/n8n` Docker image will no longer include the
75
75
76
76
n8n will remove the Pyodide-based Python Code node and tool and replace them with a [task runner-based](/hosting/configuration/task-runners.md) implementation that uses native Python for better security and performance. Starting in v2.0, you can only use Python Code nodes with task runners in [external mode](/hosting/configuration/task-runners.md#external-mode) and native Python tools.
77
77
78
-
The native Python Code node doesn't support built-in variables like `_input` or dot access notation, which were available in the Pyodide-based version. For details, see the [Code node documentation](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md#python-native-beta).
78
+
The native Python Code node doesn't support built-in variables like `_input` or dot access notation, which were available in the Pyodide-based version. For details, see the [Code node documentation](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md#python-native).
79
79
80
80
The native Python tool supports `_query` for the input string that the AI Agent passes to the tool when it calls it.
Copy file name to clipboardExpand all lines: docs/hosting/configuration/task-runners.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,6 @@ contentType: howto
8
8
9
9
Task runners are a generic mechanism to execute tasks in a secure and performant way. They're used to execute user-provided JavaScript and Python code in the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md).
10
10
11
-
/// note | In beta
12
-
Task runner support for native Python and the `n8nio/runners` image are in beta. Until this feature is stable, you must use the `N8N_NATIVE_PYTHON_RUNNER=true` environment variable to enable the Python runner.
13
-
///
14
-
15
11
This document describes how task runners work and how you can configure them.
16
12
17
13
## How it works
@@ -79,6 +75,8 @@ volumes:
79
75
n8n_data:
80
76
```
81
77
78
+
There are three layers of configuration: the n8n container, the runners container, and the launcher inside the runners container.
79
+
82
80
### Configuring n8n container in external mode
83
81
84
82
These are the main environment variables that you can set on the n8n container running in external mode:
@@ -106,14 +104,19 @@ For full list of environment variables see [task runner environment variables](/
106
104
107
105
### Configuring launcher in runners container in external mode
108
106
109
-
The launcher will read environment variables from runners container environment, and will pass them along to each runner as defined in the [default launcher configuration file](https://github.com/n8n-io/n8n/blob/master/docker/images/runners/n8n-task-runners.json), located in the container at `/etc/task-runners.json`. The default launcher configuration file is locked down, but you will likely want to edit this file, for example, to allowlist first- or third-party modules. To customize the launcher configuration file, mount to this path:
107
+
The launcher reads environment variables from runners container environment, and performs the following actions:
108
+
109
+
* Passing environment variables from the launcher's own environment to all runners (`allowed-env`)
110
+
* Setting specific environment variables on specific runners (`env-overrides`)
111
+
112
+
Which environment variables to pass and to set are defined in the [launcher config file](https://github.com/n8n-io/n8n/blob/master/docker/images/runners/n8n-task-runners.json) included in the runners image. This config file is located in the container at `/etc/task-runners.json`. To learn more about the launcher config file, refer to the [Config file documentation](https://github.com/n8n-io/task-runner-launcher/blob/main/docs/setup.md#config-file).
113
+
114
+
The default launcher configuration file is locked down, but you can edit this file, for example, to allowlist first- or third-party modules. To customize the launcher configuration file, mount to this path:
For further information about the launcher config file, see [here](https://github.com/n8n-io/task-runner-launcher/blob/main/docs/setup.md#config-file).
116
-
117
120
## Adding extra dependencies
118
121
119
122
### 1. Extend the `n8nio/runners` image
@@ -158,10 +161,6 @@ You must also allowlist any first-party or third-party packages for use by the C
158
161
* `N8N_RUNNERS_STDLIB_ALLOW`: comma-separated list of allowed Python standard library packages.
159
162
* `N8N_RUNNERS_EXTERNAL_ALLOW`: comma-separated list of allowed Python packages.
160
163
161
-
#### Multiple runners and the port for the runner's health check server
162
-
163
-
When a single runner is configured, the *"health-check-server-port"* field found in the `n8n-task-runners.json` configuration file is optional and defaults to 5681. When multiple runners are configured, this is required and must be unique per runner. Refer to the launcher’s [config file documentation](https://github.com/n8n-io/task-runner-launcher/blob/main/docs/setup.md#config-file) for the full list of options and examples.
0 commit comments