Skip to main content

orchestra-lang

Parse, validate, and transpile Orchestra pipeline definitions from Python.

orchestra-lang is the Python binding for the Orchestra pipeline DSL — the same engine that powers the Orchestra VS Code extension. It ships the dialect's schema and validators as a native library, so you get full dialect-aware parsing and validation without calling out to a separate process.

About the dialect

Orchestra pipelines are authored in a KSON-based DSL for defining, validating, and shipping data pipelines. A pipeline describes tasks, dependencies, conditions, triggers, and variables across 100+ integrations (Snowflake, dbt, Fivetran, Databricks, and more).

A minimal pipeline looks like this:

version: v1
name: "task-references"
pipeline:
  producer:
    integration: SNOWFLAKE
    integration_job: SNOWFLAKE_RUN_QUERY
    parameters:
      set_outputs: true
      statement: "SELECT 1"
      .
    .
  consumer:
    integration: SNOWFLAKE
    integration_job: SNOWFLAKE_RUN_QUERY
    condition: "${{ tasks['producer'].status == 'SUCCEEDED' }}"
    parameters:
      statement: "SELECT ${{ tasks['producer'].outputs['count'] }}"
      .
    depends_on: [producer]
    .
  .

The trailing . closes a block — KSON's alternative to significant dedent.

The dialect validates required fields and types, integration-specific parameters, variable references and expressions, task dependencies, cron syntax, and branching conditions. See the Orchestra documentation for the full language reference.

Installation

pip install orchestra-lang

Then import it as oml_lang:

import oml_lang

Wheels are published for Linux (x86_64, aarch64), macOS (Apple Silicon) and Windows (x86_64), on CPython 3.10 and newer.

API

Five top-level functions; most return the underlying engine's own result object so you can introspect errors, tokens and values directly, while format returns a plain string.

analyze(kson: str) -> Analysis

Statically analyze an Orchestra document. The bundled engine runs the Orchestra dialect validators automatically, so analyze catches parse errors, schema violations, expression syntax errors, bad task references, circular dependencies, invalid cron expressions, and so on.

import oml_lang

src = open("pipeline.oml").read()
analysis = oml_lang.analyze(src)

for msg in analysis.errors():
  start = msg.start()
  print(f"[{msg.severity()}] {start.line()}:{start.column()}  {msg.message()}")

Example output for a pipeline with a broken condition expression and missing required fields:

[MessageSeverity.ERROR] 3:53  Expression syntax error: Expected RPAREN but got ''
[MessageSeverity.WARNING] 0:0  Missing required properties: version, name

The Analysis object

Analysis exposes three views of the analyzed document:

  • errors() -> list[Message] — every error and warning produced by the parser, schema validator, and dialect validators. Each Message carries a severity() (MessageSeverity.ERROR or MessageSeverity.WARNING), a message() string, and start() / end() Positions whose line() and column() methods return zero-based offsets. An empty list means the document is valid.

  • tokens() -> list[Token] — the full lexed token stream, useful for syntax highlighting and editor tooling. Each Token has token_type() (a TokenType enum), text(), and start() / end() positions.

  • kson_value() -> KsonValue | None — the parsed document as a typed value tree, or None if parsing failed fatally. Call type() to get a KsonValueType discriminator, or isinstance check against KsonValue.KsonObject, KsonValue.KsonArray, KsonValue.KsonString, KsonValue.KsonNumber, KsonValue.KsonBoolean, KsonValue.KsonNull, or KsonValue.KsonEmbed to walk the tree.

from oml_lang import analyze, KsonValue

analysis = analyze(src)
root = analysis.kson_value()
if isinstance(root, KsonValue.KsonObject):
  # ... walk the object
  ...

to_json(kson: str, options: TranspileOptions.Json) -> Result

Transpile Orchestra source to JSON. Returns a Result — pattern-match on Result.Success / Result.Failure:

from oml_lang import to_json, Result, TranspileOptions

result = to_json(src, TranspileOptions.Json(retain_embed_tags=False))
if isinstance(result, Result.Success):
  print(result.output())
else:
  for err in result.errors():
    print(err.message())

to_yaml(kson: str, options: TranspileOptions.Yaml) -> Result

Same shape as to_json, but emits YAML and preserves comments.

from oml_lang import to_yaml, TranspileOptions

result = to_yaml(src, TranspileOptions.Yaml(retain_embed_tags=False))

format(kson: str, format_options: FormatOptions) -> str

Pretty-print Orchestra source with the given formatting options. Applies the dialect's embed-block rules but not its validators, so this is lossless reformatting, not validation — run analyze to validate.

import oml_lang
from oml_lang import FormatOptions, FormattingStyle, IndentType

formatted = oml_lang.format(
  src,
  FormatOptions(
    indent_type=IndentType.Spaces(2),
    formatting_style=FormattingStyle.PLAIN,
    embed_block_rules=[],
  ),
)

parse_schema(schema_kson: str) -> SchemaResult

Parse a KSON JSON-Schema document and, on success, return a reusable SchemaValidator.

from oml_lang import parse_schema, SchemaResult

result = parse_schema(open("my.schema.kson").read())
if isinstance(result, SchemaResult.Success):
  validator = result.schema_validator()
  messages = validator.validate(src, "document.oml")

Metadata

Release files for orchestra-lang 2026.930.0

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

Built distributions (wheels)

Table of built distributions (wheels) for orchestra-lang 2026.930.0
File Actions
orchestra_lang-2026.930.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for orchestra_lang-2026.930.0-cp310-abi3-win_amd64.whl
orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details for orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_x86_64.whl
orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_aarch64.whl CPython 3.10 abi3 Linux glibc 2.34+ ARM64 Details for orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_aarch64.whl
orchestra_lang-2026.930.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for orchestra_lang-2026.930.0-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 79.9 MB

Release files / orchestra_lang-2026.930.0-cp310-abi3-win_amd64.whl

Download URL orchestra_lang-2026.930.0-cp310-abi3-win_amd64.whl
Size 19.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3094819d8e1ba57c7091ab6bdf78ab4236f4b611e9c8123de297b370d7a25152
BLAKE2b-256 checksum
How to use checksums
0f5d9eb7fb68d22a47f8d80902f4fc327ad5488d2aae1fb833a8fc52dd18a119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_x86_64.whl
Size 20.9 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
6288eba9775cc58b5189265fd676d0dbf0d65dc8af99dd903fe591d1ed22cbd7
BLAKE2b-256 checksum
How to use checksums
43e74766f9da05bf292d40ead0310e9f99fe66d0ebb7151a8fc0c2bc0b8dfb50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_aarch64.whl

Download URL orchestra_lang-2026.930.0-cp310-abi3-manylinux_2_34_aarch64.whl
Size 20.6 MB
Tags CPython 3.10 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
5f1532dced264569095734ec95ae9f372a30f37c3fb66835316223005ae991b6
BLAKE2b-256 checksum
How to use checksums
4c8b32f43233c41c2b399c2ad0147e242bae536ea83fb7a4c52bc5de04b7a36d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / orchestra_lang-2026.930.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL orchestra_lang-2026.930.0-cp310-abi3-macosx_11_0_arm64.whl
Size 19.0 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0be8a69a930cc07f8c7c4a6285f0e305b842697127dbbdbd43a3dceec6d573a7
BLAKE2b-256 checksum
How to use checksums
3a3dcd1908fb68fd89eb9926f0de232f322fc94354f0b2ac026d92e733850497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.4

Security for orchestra-lang 2026.930.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

2026.930.0 This release

4 release files No provenance

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