本文整理匯總了Python中datalogger.DataLogger.list_ts_caches方法的典型用法代碼示例。如果您正苦於以下問題:Python DataLogger.list_ts_caches方法的具體用法?Python DataLogger.list_ts_caches怎麽用?Python DataLogger.list_ts_caches使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類datalogger.DataLogger
的用法示例。
在下文中一共展示了DataLogger.list_ts_caches方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_caches_dict
# 需要導入模塊: from datalogger import DataLogger [as 別名]
# 或者: from datalogger.DataLogger import list_ts_caches [as 別名]
def get_caches_dict(args):
"""
DEPRECATED use get_caches instead
get name of all index keys found in one specific TimeseriesArray
parameters:
/<str>project/<str>tablename/<str>datestring
returns:
<json><list> of all index combinations
"""
# the same for all vicenter data
project, tablename, datestring = args[:3]
datalogger = DataLogger(basedir, project, tablename)
keys = []
for cache in datalogger.list_ts_caches(datestring):
key = dict(zip(datalogger.index_keynames, cache[1][1]))
keys.append(key)
return json.dumps(keys)
示例2: get_ts_caches
# 需要導入模塊: from datalogger import DataLogger [as 別名]
# 或者: from datalogger.DataLogger import list_ts_caches [as 別名]
def get_ts_caches(args):
"""
DEPRECATED use get_caches instead
get name of all index keys found in one specific TimeseriesArray
useful to build autofill input fields
attention: there are only ts caches if the raw data is already converted
ex: Datalogger/get_ts_caches/{projectname}/{tablename}/{datestring}
datstring has to be in format YYYY-MM-DD
returns:
json(list of all index keys)
"""
project, tablename, datestring = args[:3]
datalogger = DataLogger(basedir, project, tablename)
keys = []
for cache in datalogger.list_ts_caches(datestring):
keys.append(cache[1])
return json.dumps(keys)