本文整理汇总了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)