Hi,
I am trying to list the properties of a Thing using the Python API, but I'm having a bit of trouble.
I took this code from here: https://pypi.org/project/arduino-iot-client/
......
......
# Now we setup the iot-api Python client, first of all create a
# configuration object. The access token goes in the config object.
client_config = iot_api_client.Configuration(host = "https://api2.arduino.cc/iot")
# client_config.debug = True
client_config.access_token = token.get("access_token")
# Create the iot-api Python client with the given configuration
api_client = iot_api_client.ApiClient(client_config)
# Each API model has its own wrapper, here we want to interact with
# devices, so we create a DevicesV2Api object
api_instance = iot_api_client.DevicesV2Api(api_client)
# Get a list of devices, catching the specific exception
try:
resp = api_instance.devices_v2_list()
print("Response from server:")
print(resp)
except ApiException as e:
print("An exception occurred: {}".format(e))
And when I run it I get the following error:
AttributeError: module 'iot_api_client' has no attribute 'DevicesV2Api'.
Thanks!