Skip to main content

YAML Workflow Framework

YAML workflow engine — parses, validates, and executes step-based workflows with pluggable Action / Evaluator / Predicate / Iterable methods.

Overview

vcti-ywf is the workflow engine behind VCollab Insights. A workflow is a directory of YAML files — about.yaml, variables/main.yaml, steps/main.yaml — that describe an automated process declaratively. The engine parses those files (with support for !var, !include, and !module tags), resolves variables, evaluates control-flow blocks (if-else, for-each, try-except), and dispatches each step to a registered method plugin.

Method plugins come in four typed shapes — Action (side-effecting), Evaluator (produces a value), Predicate (boolean test), and Iterable (yields keys for for-each). A built-in stdlib package ships common methods; downstream consumers add domain-specific methods (CAE data extraction, plotting, report generation) by registering their own classes.

Workflow YAML is evaluated against a sandboxed Context by default — - evaluator: evaluate expressions go through simpleeval, and {{ var }} template interpolation goes through Jinja2's SandboxedEnvironment. Engine-internal context variables (__runtime__ and friends) are filtered from author-facing scope. Hosts that run fully-trusted YAML can opt into raw eval or the full Jinja2 environment by constructing the Context themselves and passing it to Runner.run().

Installation

pip install vcti-ywf>=8.0.0

In requirements.txt

vcti-ywf>=8.0.0

In pyproject.toml dependencies

dependencies = [
    "vcti-ywf>=8.0.0",
]

Quick Start

Run a workflow from Python:

from pathlib import Path

from vcti.ywf.engine import Runner, Workflow

workflow = Workflow(Path("path/to/my-workflow"))
workflow.read_all()

result = Runner(workflow).run({"input_file": "data/model.h5"})

print(result.return_value)   # top-level block's value
print(result.outputs)        # declared outputs read from final context

For monitoring or debugging, build an ObservableContext, attach observers, and pass it to run():

from vcti.ywf.engine import ObservableContext, Runner
from vcti.ywf.engine.execution.observers.history_observer import HistoryObserver

context = ObservableContext()
context.add_observer(HistoryObserver())

Runner(workflow).run({"input_file": "data/model.h5"}, context)

A minimal workflow directory looks like:

my-workflow/
├── about.yaml              # title, description, tags, images
├── variables/
│   └── main.yaml           # inputs + outputs declarations
└── steps/
    └── main.yaml           # execution steps

variables/main.yaml declares the workflow's external contract — inputs (supplied by the caller) and outputs (produced by the run):

- name: input_file
  type: input_file_path
  description: Path to the simulation results
  default: data/sample.h5

- name: mode_count
  type: int
  default: 0
  description: Number of modes extracted.
  output: true          # handed back in RunResult.outputs

steps/main.yaml lists actions, evaluators, predicates, and iterables — each is a YAML mapping keyed by its method name. Detecting a file's format and reading it illustrates the typical pattern:

- evaluator: detect_file_format
  path: !var input_file
  set_to: file_format

- if:
    predicate: compare
    lhs: !var file_format
    op: "=="
    rhs: json-file
  then:
    - evaluator: read_file
      file_path: !var input_file
      set_to: data
    - action: log_message
      message: "Input loaded."
  else:
    - action: log_message
      log_level: error
      message: "Unsupported input format."

Documentation

User guides — start here:

  • docs/design.md — why ywf is shaped the way it is: its purpose, core concepts, decisions and boundaries.
  • docs/concepts/ — how a workflow behaves: methods, blocks, values, variables and scopes, includes and modules, errors.
  • docs/tutorial.md — walk through the greeting workflow end-to-end with the Python API, then expand to control-flow blocks and file reading.
  • docs/yaml-reference.md — exhaustive field reference for about.yaml, variables/main.yaml, steps/main.yaml, and every step type (action / evaluator / predicate / iterable / if-else / for-each / try-except).
  • docs/yaml-tags.md — !var, !include, and !module semantics with scoping rules.
  • docs/plugins.md — author guide for custom workflow methods.

Developer reference — engine concepts subpackage by subpackage:

Internals — for engine maintainers and tool builders:


Dependencies

Third-party:

  • pydantic (>=2.0) — model validation
  • PyYAML (>=6.0) and pyyaml-include (>=2.0) — YAML parsing with !include
  • Jinja2 (>=3.0) — {{ var }} interpolation in Property[str] fields (sandboxed via SandboxedEnvironment in the default Context)
  • simpleeval (>=1.0) — sandboxed expression evaluator for - evaluator: evaluate
  • NumPy (>=1.24) — arrays returned by the NumPy file loaders
  • pandas (>=2.0) — DataFrame iteration in list_items

VCollab platform packages:

Optional extras:

Metadata

Release files for vcti-ywf 8.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vcti-ywf 8.0.0
File Size Uploaded Provenance Actions
vcti_ywf-8.0.0.tar.gz 260.1 kB With provenance Details for vcti_ywf-8.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vcti-ywf 8.0.0
File Interpreter ABI Platform Actions
vcti_ywf-8.0.0-py3-none-any.whl Python 3 none any Details for vcti_ywf-8.0.0-py3-none-any.whl

Total release size: 441.4 kB

Release files / vcti_ywf-8.0.0.tar.gz

Download URL vcti_ywf-8.0.0.tar.gz
Size 260.1 kB
Tags Source
SHA-256 checksum
How to use checksums
614b33f5728ec02e4622177dee68bd0c57a91cb60bf0157eea61d73b9df76703
BLAKE2b-256 checksum
How to use checksums
b93b1ade5c094c54373234de788db7268021bcc79cdc04d513cda717787f0bae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / vcti_ywf-8.0.0-py3-none-any.whl

Download URL vcti_ywf-8.0.0-py3-none-any.whl
Size 181.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9098602de8fb315252b601585785cd762bd9800f7e827bdb8f6a6a57a902bd89
BLAKE2b-256 checksum
How to use checksums
1b29e0b75daecfbb09f4af039ad99e451e40fdb6a83f4a711c67bd32ac3fd53f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for vcti-ywf 8.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vcti_ywf-8.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page