Usage & Examples
Navigating the system tree
client = spx_python.init(address=BASE_URL, product_key=PRODUCT_KEY)
# Access the models container
models = client["models"] # returns another SpxClient
# Descend to an instance and grab the temperature attribute wrapper
sensor = client["instances"]["sensor"]
temperature_attr = sensor["attributes"]["temperature"]
current = temperature_attr.internal_value # READ
temperature_attr.internal_value = current + 2.5 # WRITE
# Methods exposed by a component become callables
sensor.reset()
sensor.start()Using get, keys, items
get, keys, itemsSetting attributes via put_attr
put_attrTransparent mode for dry runs
Managing models and instances
Waiting for state changes
Bootstrapping whole systems
Calling component methods
Putting it together
Last updated

