pashehnet.sensors.formats.csv#

Module Contents#

Classes#

CSVFormat

CSV formatter class for sensor data. Given a value, format into CSV based on the provided template specs.

API#

class pashehnet.sensors.formats.csv.CSVFormat(prefix_fields=None, value_field='value', headers=True)#

Bases: pashehnet.sensors.formats.base.SensorFormatBase

CSV formatter class for sensor data. Given a value, format into CSV based on the provided template specs.

Initialization

CTOR for class

Parameters:
  • prefix_fields – Dict of prefix fields+values to include in CSV output

  • value_field – Name of field where the value will be emitted

  • headers – Toggle whether headers are generated during formatting

__slots__ = ()#
transform(value)#

Apply the CSV formatting to the given value

Parameters:

value – Value to transform.

Returns:

CSV formatted string