Dieser Artikel zeigt einige Beispiele zur Verwendung der Python SDK.
Laden eines Objektes mit allen Messpunkten mit Letztwert
import lmapi from lmapi.LMApi import LMApi # client instanciation, auth-tokens will automatically be renewd if necessary client = LMApi(your_api_client_id, your_api_client_secret) # load a single asset with custom-key asset1 = client.load('mycustomkey')
# from this asset load all datastreams and then their latest value datatstreams = asset1.load_datastreams()
for ds in datastreams: print(ds.load_last_value())
import lmapi from lmapi.LMApi import LMApi # client instanciation, auth-tokens will automatically be renewd if necessary client = LMApi(your_api_client_id, your_api_client_secret) # load a single asset with custom-key asset1 = client.load('mycustomkey') # from this asset load all datastreams and then their latest value datatstreams = asset1.load_datastreams() for ds in datastreams: print(ds.load_last_value())