Пример #1
0
def dump(service, format, **kwargs):
    """Dumps timeseries data to files.

    Dumps the timeseries data for all sensors in the organization.

    One file is generated for each sensor with the sensor id as filename and the
    file extension based on the requested dump format
    """
    sensors = dpath.values(service.get_sensors(), '/data/*/id')
    ts.dump(service, sensors, format, **kwargs)
Пример #2
0
def dump(service, label, format, **kwargs):
    """Dumps timeseries data to files.

    Dumps the timeseries data for all sensors in a given LABEL.

    One file is generated for each sensor with the sensor id as filename and the
    file extension based on the requested dump format
    """
    label = util.lookup_resource_id(service.get_labels, label)
    sensors = dpath.values(service.get_label_sensors(label), '/data/*/id')
    ts.dump(service, sensors, format, **kwargs)
Пример #3
0
def dump(service, sensor, format, **kwargs):
    """Dumps timeseries data to files.

    Dumps the timeseries data for one SENSOR to a file.
    If no sensors or label is specified all sensors for the organization
    are dumped.

    One file is generated with the sensor id as filename and the
    file extension based on the requested dump format
    """
    sensor = _find_sensor_id(service, sensor, **kwargs)
    ts.dump(service, [sensor], format, **kwargs)