Harmont docs
Pipeline SDKReference

Pipeline

Generated reference for the harmont Pipeline API.

dump_registry_json

Emit the schema_version=1 envelope JSON.

Defaults mirror pipeline_to_json: pipeline_org <- env["HARMONT_PIPELINE_ORG"] or "default" now <- int(time.time()) base_path <- Path.cwd() (resolves on_change cache paths) env <- os.environ Per-pipeline slug is read from each registration.

The target memoization cache is cleared at the start of each render so per-pipeline target invocations dedup within a single render but don't leak across renders. The named-target registry is left intact so pipeline fixture-style params can resolve their dependencies.

dump_registry_json(*, pipeline_org=None, now=None, base_path=None, env=None) -> str
ParameterTypeDefaultDescription
pipeline_orgstr | NoneNone
nowint | NoneNone
base_pathPath | NoneNone
envMapping[str, str] | NoneNone

Returns str

pipeline

Build a v0 IR dict or register a pipeline function.

This function is polymorphic based on the type of its positional arguments.

Factory form — every positional is a Step:

pipeline(*leaves, env=None, default_image=None) -> dict

Decorator form — no positionals or a string slug:

@pipeline(slug=None, *, name=None, triggers=(), allow_manual=True, env=None, default_image=None) def my_pipeline() -> Step: ...

The decorator registers the wrapped function in the module-level pipeline registry (HAR-9). The discriminant is the type of the positional arguments: any non-Step positional (including a string slug, or no positional at all) routes to the decorator path.

pipeline(*args, **kwargs) -> Any
ParameterTypeDefaultDescription
argsAny()
kwargsAny{}

Returns Any — A v0 IR dict in factory form, or a decorator in decorator form.

pipeline_to_json

Convenience re-export so callers can do

harmont.pipeline_to_json(pipeline(...)) without importing json_emit directly. See json_emit.pipeline_to_json for kwargs.

pipeline_to_json(p, **kw) -> str
ParameterTypeDefaultDescription
pdict[str, Any]required
kwAny{}

Returns str

On this page