Skip to main content
Actions

Python Notebook

action_notebook

Execute a multi-cell Python notebook in an Isolated Sandbox with rich table and chart outputs.

Inputs1
Outputs1
Settings8
Field AccessPython Context
Examples2

About this Node

Executes a version-pinned multi-cell Jupyter notebook (.ipynb) top-to-bottom inside an Isolated Sandbox with access to workflow state via `inputs`, staged `FileRef` attachments in `INPUTS_DIR`, and file outputs in `OUTPUTS_DIR`. Structured results assigned to `outputs` are written under `output_key`, and a fully rendered executed notebook report (`notebook.executed.ipynb`) with tables, plots, and cell timings is persisted automatically for Run History inspection.

Ports & Branches

Inputs (1)
inPort 0Inbound execution flow
Outputs (1)
outPort 1Outbound execution flow with notebook outputs and executed report artifact

How this Node Reads Data

Input Access Field Example Description
Sandbox `inputs` Dictionary Python Context input_key records = inputs["input"]; threshold = inputs.get("min_score", 0.8) Receives `inputs["input"]` mapped from `input_key` along with all other non-internal scoped state keys. Any `FileRef` objects are automatically staged on disk under `INPUTS_DIR`.

State Keys Written (Outputs)

Key Pattern Type Role Description
{output_key} object | any Primary Clean serialized contents assigned to the notebook's `outputs` dictionary (default key `notebook_result`), plus `_files` `FileRef` handles for files saved to `OUTPUTS_DIR`.

Tips & Best Practices

  • Pin a notebook version in Project Storage so scheduled and triggered runs stay reproducible.
  • Use Shift+Enter, Ctrl+Enter, and Alt+Enter in Notebook Studio to test cells iteratively before saving a new version.
  • Every automated run persists a read-only executed notebook report viewable in Run History.

Commonly Paired With