Skip to main content

Vendor


id: py-Vendor

Vendor

A Vendor groups related StatusCode definitions together. Vendors are defined in the Resource Status Definition Asset and accessed through StatusRegistry or Status lookup methods.

The internal vendor "LAY" (ID 1) is reserved for layline.io system statuses. Your custom vendors start from ID 2.


At a Glance

# Get vendor via Status helper
vendor = Status.getVendorByName('MyApplication')

# Or via registry
vendor = statusRegistry.getVendorByLongName('MyApplication')

# Browse status codes
for code in vendor.statusCodes:
stream.log_info(f"{code.code}: {code.message}")

Properties

PropertyTypeDescription
idintVendor ID (1 = internal LAY, 2+ = custom)
longNamestrFull vendor name
shortNamestrShort vendor identifier
statusCodesList[StatusCode]All status codes for this vendor
vendor = statusRegistry.getVendorByLongName('MyApplication')

print(vendor.id) # 2
print(vendor.longName) # "MyApplication"
print(vendor.shortName) # "MYAPP"
print(len(vendor.statusCodes)) # 25

See Also