Elements runtime reference / Live streaming

appendRows

Append rows to a live command-stream datasource while the Element is still running.

Signatuur

appendRows(rows=None, **kwargs)

Doel

Append rows to a live command-stream datasource while the Element is still running.

Aliases and imports

  • append_rows

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "rows": [
    {
      "step": 1,
      "status": "running"
    }
  ]
}
FieldDescription
rowsList of row dicts, or kwargs['rows'].
kwargsOptional command metadata merged into the event payload.

Return payload

{
  "event": "command",
  "op": "append",
  "rows": [
    {
      "step": 1,
      "status": "running"
    }
  ]
}

Voorbeeld

def run():
    appendRows([{"step": 1, "status": "running"}])
    appendRows([{"step": 2, "status": "done"}])
    return {"ok": True}

Scope-notities