def get_canarydrops_array(min_time='-inf', max_time='+inf'): """Return an array of stored Canarydrops. Arguments: min_time -- Limit to Canarydrops created after min_time. Format is Unix epoch. Default is no limit. max_time -- Limit to Canarydrops created before max_time. Format is Unix epoch. Default is no limit. """ canarydrops = [] for canarytoken in db.zrangebyscore(KEY_CANARYDROPS_TIMELINE, min_time, max_time): canarydrops.append(get_canarydrop(canarytoken=canarytoken)) return canarydrops
def get_canarydrops(min_time='-inf', max_time='+inf'): """Return a list of stored Canarydrops. Arguments: min_time -- Limit to Canarydrops created after min_time. Format is Unix epoch. Default is no limit. max_time -- Limit to Canarydrops created before max_time. Format is Unix epoch. Default is no limit. """ canarydrops = [] for canarytoken in db.zrangebyscore(KEY_CANARYDROPS_TIMELINE, min_time, max_time): canarydrops.append(Canarydrop(**get_canarydrop(canarytoken=canarytoken))) return canarydrops