.. _auto_python_executor: *PYTHON EXECUTOR* ================= Executes arbitrary Python code (typed inline or uploaded as a file) within a controlled server-side environment and exposes stdout, exit code, generated files, and any user-declared variables as typed workflow outputs. Use this worker to run custom analytics, data transformations, or glue logic anywhere in a d3VIEW workflow without leaving the platform. When to use ----------- Tagged: ``automation``, ``code_execution``, ``custom_logic``, ``dynamic_outputs``, ``python``, ``sandbox``, ``script``. Inputs ------ .. list-table:: :header-rows: 1 :widths: 20 20 20 20 20 20 * - Label - ID - Type - Default - Required - Description * - Python Code - python_code - textarea - — - - Inline Python source to execute; supports live template references — drag upstream worker outputs from the side tree into the editor to embed their values at runtime. Leave blank if supplying a python_file instead. * - Python File - python_file - file - — - - An uploaded .py file to execute when no inline code is provided; mutually exclusive with python_code — leave blank if using the code editor. * - Python Binary Path - python_binary_path - text - /storage2/bin/python3.9 - ✓ - Absolute filesystem path to the Python interpreter (e.g. /storage2/bin/python3.9); must be executable by the platform service account — change only if a non-default interpreter version is required. * - Python Libraries - python_libraries - list - — - - Pre-approved libraries to auto-import before your code runs (numpy, pandas, matplotlib, scipy, scikit-learn); select all packages your script requires to avoid manual import statements and to satisfy the security scanner. * - Output Variables - python_outputs - keyvalue - *(complex)* - - Key-value declarations mapping Python variable names in your script to d3VIEW output types (scalar, text, boolean, vector, dataset, file); each declared variable is captured after execution and exposed as a typed downstream-connectable output. Outputs ------- .. list-table:: :header-rows: 1 :widths: 20 20 20 20 * - Label - ID - Type - Description * - Standard Output - stdout - text - Full standard-output text captured from the Python process; useful for logging, print-based results, or debugging. * - Output File - output_file - file - First file written to the working directory during execution (e.g. a CSV, PNG, or HDF5); available for download or wiring to downstream file-consuming workers. * - Exit Code - exit_code - number - Integer process exit code returned by the Python interpreter — 0 indicates success; any non-zero value signals a runtime error. Disciplines ----------- - data.dataset.transform - platform.integration - platform.workflow .. raw:: html

Auto-generated from platform schema. Worker id: python_executor. Schema hash: 34d6f1cceef8. Hand-curated docs in workerexamples/ override this page when present.