SAService Architect Open designer
SAService ArchitectDocumentation
Python API reference Project(name, *, module_version=None, repo_path=None, properties={})

Project — Python Architecture DSL

The root object that owns every declaration and output operation.

When to use

Construct one Project first and pass its registered objects through the rest of the topology.

Behavior

  • Registration factories insert objects into typed registries and reject duplicate derived keys.
  • References remain Python objects until serialization converts them to symbolic YAML names.
  • Output methods validate cross-object ownership before producing YAML or API requests.

Constructor properties

Project identity and additional settings.

PropertyTypeDescription
namestr

Project name serialized as settings.name.

Required
module_versionstr | None

ServiceLib/module version selected for generated code.

Default: None
repo_pathstr | None

Repository identity used by language generators.

Default: None
propertiesdict[str, Any]

Additional supported settings.

Default: {}

Public registries properties

Objects are keyed by their generated symbolic key.

PropertyTypeDescription
modulesdict[str, Module]

Registered project modules.

poolsdict[str, Pool]

Registered task pools.

typesdict[str, TypeDefinition]

Registered data types.

servicesdict[str, Service]

Registered services.

connectorsdict[str, Connector]

Registered data connectors.

Output methods properties

Final operations on a composed project.

PropertyTypeDescription
validate()list[Diagnostic]

Return diagnostics without writing output.

to_document()dict[str, Any]

Return the symbolic YAML-shaped document.

to_yaml()str

Serialize the canonical YAML contract.

write_yaml(path)Path

Write canonical YAML and return its path.

generate_code(...)GeneratedProjectArchive

Authenticate, call Service Architect, and return a ZIP.

Python example

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

if diagnostics := project.validate():
    raise RuntimeError(diagnostics)
project.write_yaml("architecture.yaml")