n8n-code-python
Python Code Node (native)
Since n8n 2.0 the Code node's Python runs as native Python in a task runner (language: "pythonNative"). The old Pyodide "Python (Beta)" is gone, and with it every n8n helper it had:
_input, _json, _node, _now, _today and _jmespath all raise NameError now. Code copied
from old templates, forum posts or older docs usually breaks on this.
JavaScript first — stronger than before
Native Python gives you two variables and plain Python, and by default no imports: no
json, datetime or re. Everything n8n-specific ($('Node'), $jmespath, Luxon,
this.helpers.httpRequest, static data) exists only in JavaScript. Use Python only when the user
explicitly asks for it. Even then, first check whether an expression, Edit Fields, or a native
node (Crypto, Date & Time, HTML, XML) does the job. See n8n-code-javascript and the transform
gatekeeper in n8n-expression-syntax.