Skip to content

createPoint

A very simple utility to build a structured point.

createPoint(value, timestamp, status="OK")

  • value (int | float)
  • timestamp (str | int | float | datetime)
  • status (str, default: OK)
  • value: Numeric value to store.
  • timestamp: Timestamp for the value.
  • status: Quality flag (OK or BAD).
point = createPoint(38.5, "2024-01-01 00:00:00", status="OK")

Output:

{ "value": 38.5, "timestamp": "2024-01-01 00:00:00", "status": "OK" }
point = createPoint(12.3, 1704067200, status="BAD")

Output:

{ "value": 12.3, "timestamp": 1704067200, "status": "BAD" }