I want to verify that the data being received by a binding transform is in the form of either a list or a JsonifiableArrayList, since that seems to be the type that common array properties are stored as.
I’ve been trying to access the data type like so:
from com.inductiveautomation.perspective.gateway.script import JsonifiableArrayList
However, when I try to access the JsonifiableArrayList class to compare the data’s type to, I get the following error:
ImportError: No module named perspective
I verified that this class is in my environment with the supplied package path, so I have no idea why this is happening.
Right. Perspective itself has full access to its own classes. Scripts to not have access via classloader/import, only via objects Perspective hands to them.
Is there a typical standard for verifying that a value being received by a script transform is a list? Is the typical approach just to check if the value is iterable but not a string or a dictionary?
This is the way. Check if it's list like (but not a string or dictionary), don't try to guarantee which type you're actually receiving. Ignition scripting methods may choose to return a Java array, a Java list, a special Java object that acts as a distinct Python class, or anything else; any strict isinstance check is only going to lead to headaches down the road.