SAService Architect Back to designer
SAService ArchitectDocumentation
Python API reference Package | Module | Function | InitializerGroup

Package, Module, Function, and InitializerGroup

Typed ownership and generated callback metadata passed to type, endpoint, and stream factories.

When to use

Create these objects once and reuse them instead of passing package, module, and initializer names as strings.

Behavior

  • Package represents a logical target-language package path.
  • Module is registered on Project and represents a generated or shared module owner.
  • Function describes one generated business callback and references Package, Module, and InitializerGroup objects.
  • ROOT_PACKAGE and LOCAL_MODULE explicitly represent root-package placement and local ownership.

Package(path="") properties

Logical package metadata.

PropertyTypeDescription
pathstr

Logical package path; empty means the selected generated root.

Default: empty
ROOT_PACKAGEPackage

Reusable empty Package singleton.

project.module() properties

Registered shared owner.

PropertyTypeDescription
namestr

Module name and derived key.

Required
module_pathstr

Published repository/module path.

Required
golang_versionstr

Go language version metadata.

Required

Function() properties

Generated callback contract metadata.

PropertyTypeDescription
namestr

Generated callback/type name.

Required
packagePackage

Function package object.

Default: ROOT_PACKAGE
descriptionstr

Generated documentation.

Default: empty
initializer_groupInitializerGroup

Dependency-initialization group.

Default: empty InitializerGroup
moduleModule | LOCAL_MODULE | None

Public owner, explicit local owner, or omitted field.

Default: None
publicbool | None

Generate the callback through a public ownership path.

Default: None

Python example

domain_package = Package("domain/orders")
startup = InitializerGroup("startup")
model = project.module(
    "Model",
    module_path="github.com/example/orders/model",
    golang_version="1.25.4",
)
validate_order = Function(
    name="ValidateOrder",
    package=domain_package,
    initializer_group=startup,
    module=LOCAL_MODULE,
)