SAService Architect Back to designer
SAService ArchitectDocumentation
Python DSL reference deterministic declarations only

Declarative authoring restrictions

Keep Python files as a deterministic, reviewable description of the graph rather than a general application program.

When to use

Apply these rules to every project edited locally, by Codex, or inside the Designer browser workspace.

Behavior

  • Use assignments, imports, typed factory calls, object references, and >> or << graph expressions.
  • Split declarations into modules for readability, but make every import contribute directly to construction of the same Project.
  • The same source files must construct the same topology and canonical YAML on every execution.
  • Business logic belongs in generated runtime implementation files, not in the architecture authoring project.

Use in authoring files properties

Small deterministic building blocks that round-trip cleanly.

PropertyTypeDescription
Typed objectsrecommended

Project, services, pipelines, streams, connectors, endpoints, types, modules, packages, pools, and config objects.

Static importsrecommended

Explicit imports between files in the same modular project.

Object referencesrecommended

Pass declared objects instead of string keys or numeric IDs.

Graph operatorsrecommended

Use >>, <<, from_sources, on_error, and typed call-semantic methods.

Keep out of the topology project properties

Code that makes the graph opaque, non-deterministic, unsafe, or impossible to reconstruct from YAML.

PropertyTypeDescription
Loops and dynamic generationnot supported

Even repetitive declarations should remain explicit or be generated once and reviewed as explicit Python modules.

I/O and external statenot supported

Files, environment, network, databases, subprocesses, clocks, and randomness must not influence the graph.

Business implementationwrong layer

Implement generated Function contracts in the target runtime project.

Preferred explicit authoring

orders = service.pipeline("orders")
consume = orders.input("Consume Orders", endpoint=created, value_type=order)
validate = orders.map("Validate Order", function=validate_order, value_type=order)
publish = orders.sink("Publish Orders", endpoint=processed, value_type=order)

consume >> validate >> publish