Skip to content

Commit 20fb1f0

Browse files
ivovcubic-dev-ai[bot]HumanistSerif
authored
docs: Mark native Python as stable (#3972)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Co-authored-by: Kartik Balasubramanian <22399046+HumanistSerif@users.noreply.github.com>
1 parent ba906e4 commit 20fb1f0

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

_snippets/integrations/builtin/core-nodes/code-node.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The Code node editing environment supports time-saving and useful keyboard short
5858

5959
## Python (Pyodide - legacy)
6060

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.
6262

6363
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.
6464

@@ -82,9 +82,9 @@ You can't access the file system or make HTTP requests. Use the following nodes
8282
* [Read/Write File From Disk](/integrations/builtin/core-nodes/n8n-nodes-base.readwritefile.md)
8383
* [HTTP Request](/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/index.md)
8484

85-
## Python (Native - beta)
85+
## Python (Native)
8686

87-
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.
8888

8989
Main differences from Pyodide:
9090

@@ -93,9 +93,7 @@ Main differences from Pyodide:
9393
- Native Python denies insecure built-ins by default. See [task runners environment variables](/hosting/configuration/environment-variables/task-runners.md) for more details.
9494
- 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.
9595

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.
9997

10098
## Coding in n8n
10199

docs/2-0-breaking-changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Starting with v2.0, the main `n8nio/n8n` Docker image will no longer include the
7575

7676
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.
7777

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).
7979

8080
The native Python tool supports `_query` for the input string that the AI Agent passes to the tool when it calls it.
8181

docs/code/builtin/n8n-metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You can use Python in the Code node. It isn't available in expressions.
4040
| `$workflow.active` | Whether the workflow is active (true) or not (false). | :white_check_mark: |
4141
| `$workflow.id` | The workflow ID. | :white_check_mark: |
4242
| `$workflow.name` | The workflow name. | :white_check_mark: |
43-
=== "Python (native, beta)"
43+
=== "Python (native)"
4444
| Method | Description |
4545
| ------ | ----------- |
4646
| `_items` | Contains incoming items in "Run once for all items" mode. |

docs/hosting/configuration/task-runners.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ contentType: howto
88

99
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).
1010

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-
1511
This document describes how task runners work and how you can configure them.
1612

1713
## How it works
@@ -79,6 +75,8 @@ volumes:
7975
n8n_data:
8076
```
8177
78+
There are three layers of configuration: the n8n container, the runners container, and the launcher inside the runners container.
79+
8280
### Configuring n8n container in external mode
8381
8482
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](/
106104

107105
### Configuring launcher in runners container in external mode
108106

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:
110115

111116
```
112117
path/to/n8n-task-runners.json:/etc/n8n-task-runners.json
113118
```
114119

115-
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-
117120
## Adding extra dependencies
118121

119122
### 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
158161
* `N8N_RUNNERS_STDLIB_ALLOW`: comma-separated list of allowed Python standard library packages.
159162
* `N8N_RUNNERS_EXTERNAL_ALLOW`: comma-separated list of allowed Python packages.
160163

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.
164-
165164
### 2. Build your custom image
166165

167166
For example, from the n8n repository root:

0 commit comments

Comments
 (0)