pashehnet.sensors.formats.string#

Module Contents#

Classes#

StringFormat

Class providing string formatter based on Python core str.format()

API#

class pashehnet.sensors.formats.string.StringFormat(tpl, value_field)#

Bases: pashehnet.sensors.formats.base.SensorFormatBase

Class providing string formatter based on Python core str.format()

Initialization

CTOR

Parameters:
  • tpl – Template string to format

  • value_field – Field in template to place value

__slots__ = ()#
transform(value)#

Transform the value into formatted payload

Parameters:

value – Value to transform

Returns:

Formatted string payload