n8n/packages/nodes-base/nodes/Code/descriptions/PythonCodeDescription.ts
कारतोफ्फेलस्क्रिप्ट™ bf351243df
fix(Code Node): Install python modules always in a user-writable folder (#6568)
* upgrade pyodide

* install pyodide modules to a custom user-writable path

* in `augmentObject` `newData` is never undefined
2023-07-07 16:43:45 +02:00

49 lines
1.1 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
const commonDescription: INodeProperties = {
displayName: 'Python',
name: 'pythonCode',
type: 'string',
typeOptions: {
editor: 'codeNodeEditor',
editorLanguage: 'python',
},
default: '',
description:
'Python code to execute.<br><br>Tip: You can use luxon vars like <code>_today</code> for dates and <code>$_mespath</code> for querying JSON structures. <a href="https://docs.n8n.io/nodes/n8n-nodes-base.function">Learn more</a>.',
noDataExpression: true,
};
export const pythonCodeDescription: INodeProperties[] = [
{
...commonDescription,
displayOptions: {
show: {
language: ['python'],
mode: ['runOnceForAllItems'],
},
},
},
{
...commonDescription,
displayOptions: {
show: {
language: ['python'],
mode: ['runOnceForEachItem'],
},
},
},
{
displayName:
'Debug by using <code>print()</code> statements and viewing their output in the browser console.',
name: 'notice',
type: 'notice',
displayOptions: {
show: {
language: ['python'],
},
},
default: '',
},
];