Python DSL reference
sa-dsl inspect | validate | export | generate | importInstallation and commands
Install the package and use its CLI for validation, YAML output, and reverse generation.
When to use
Use these commands in local development and CI before requesting target-language code.
Behavior
inspectreads.service-architect/project.yamlwithout executing Python.validateexecutes the declared trusted Python entrypoint in a bounded child process and returns diagnostics.exportvalidates and atomically writes canonical YAML to the manifest output path.generatevalidates, submits an API-key-authorized asynchronous job, polls it, and writes the generated ZIP.importconverts existing Service Architect YAML into a modular Python project and creates its manifest.
CLI commands properties
Commands installed by the sa-python-dsl package.
PropertyTypeDescription
sa-dsl inspect --project <dir>discoveryRead manifest metadata without executing authoring code.
sa-dsl validate --project <dir>validationExecute and validate the manifest entrypoint.
sa-dsl export --project <dir>interchangeWrite canonical YAML to the manifest output path.
sa-dsl generate --project <dir>generationDownload a generated runtime project ZIP.
sa-dsl import <yaml> -o <dir>migrationCreate a manifest-based modular Python project from YAML.
--format human | jsonoutputUse stable JSON operation envelopes for Codex, MCP, and CI.
Shell
python -m venv .venv
. .venv/bin/activate
pip install -e .
sa-dsl inspect --project examples/processorder --format json
sa-dsl validate --project examples/processorder --format json
sa-dsl export --project examples/processorder --format json
sa-dsl generate --project examples/processorder --format json