SAService Architect Open designer
SAService ArchitectDocumentation
Python DSL reference Python objects -> Service Architect YAML -> generated project

Architecture as Code with a Typed Python DSL

A typed authoring layer for executable architecture: model meaningful stages and contracts, while implementing their business behavior in the generated service.

When to use

Use Python when composition, reuse, enums, object references, and code-level validation are more convenient than editing YAML directly.

Behavior

  • Typed Python is the editable authoring source; YAML is the generated canonical interchange contract used by Designer and ServiceGen.
  • Services, streams, connectors, endpoints, types, pools, modules, packages, and functions are represented by objects instead of repeated string references.
  • Factories expose only properties supported by that concrete entity type.
  • The same Project can emit YAML, create a designer-compatible JSON payload, or request a generated ZIP project for every selected runtime.

Authoring workflow

The Python DSL describes the composition you choose to expose, not every operation in the application. A business function can contain helper calls, branching and external interactions without turning each into a node. See architecture and business logic.

Resources properties

Package and source locations.

PropertyTypeDescription
RepositoryGitHub

https://github.com/gorundebug/sa-python-dsl

Python>= 3.11

Minimum supported interpreter version.

DependenciesPackage-managed pins

Install the dependencies declared by the package, including its pinned PyYAML and MCP versions; do not substitute an arbitrary YAML/parser version.

Python example

from sa_dsl import Project

project = Project(
    "Orders",
    module_version="v1.0.0",
    repo_path="github.com/example/orders",
)