SAService Architect Back to designer
SAService ArchitectDocumentation
Python API reference project.<primitive>_type(name, ...)

Primitive type factories

Create named definitions over built-in DataType contracts without passing a string discriminator.

When to use

Use a named primitive when the graph needs a reusable alias or documented contract; pass DataType directly when no named declaration is needed.

Behavior

  • Every method returns and registers TypeDefinition.
  • use_alias controls alias generation for primitive definitions.
  • Width-specific integer methods preserve signedness and width across generated targets.

Signed and general numeric factories properties

Numeric built-ins.

PropertyTypeDescription
int_type()int

Target-native signed integer.

int8_type(), int16_type()int8 / int16

Fixed-width signed integers.

int32_type(), int64_type()int32 / int64

Fixed-width signed integers.

float_type(), double_type()float / double

Floating-point contracts.

Unsigned factories properties

Unsigned integer built-ins.

PropertyTypeDescription
uint_type()uint

Target-native unsigned integer.

uint8_type(), uint16_type()uint8 / uint16

Fixed-width unsigned integers.

uint32_type(), uint64_type()uint32 / uint64

Fixed-width unsigned integers.

Other scalar/runtime factories properties

Text and framework contracts.

PropertyTypeDescription
byte_type(), char_type(), unicode_char_type()byte / char

Byte and character representations.

boolean_type()boolean

True/false contract.

string_type(), unicode_string_type()string

Text contracts.

any_type()any

Intentionally dynamic payload.

error_type()error

Framework error contract.

Common keyword options properties

Available on every primitive factory.

PropertyTypeDescription
namestr

Human-readable name. A stable camelCase key is derived and registered on the Project.

Required
descriptionstr | None

Documentation emitted with the generated type.

Default: None
public_typebool | None

Make the type reusable through a project Module.

Default: None
moduleModule | LOCAL_MODULE | None

Owner of a public type. Use an object, not a module-name string.

Default: None
packagePackage | None

Typed package metadata object.

Default: None
use_aliasbool | None

Generate a target-language alias over the built-in.

Default: None

Python example

order_id = project.string_type(
    "Order ID",
    use_alias=True,
    description="Stable public order identifier.",
    public_type=True,
    module=model_module,
)