Novant

Documentation

Sign in

Values & Trends

Values

Returns current values for all points on a source or asset. One of source_id or asset_id is required.

values(source_id=None, asset_id=None, point_ids=None)
Argument Default Description
source_id None Parent source ID (required unless asset_id is set)
asset_id None Parent asset ID (required unless source_id is set)
point_ids None Optional list of point ID strings to filter

Returns

ValueList with the following attributes per PointValue:

Attribute Type Description
id str Point ID
val Any Current value
status str Point status

Example

# All values for a source
for v in client.values(source_id="s.2"):
    print(v.id, v.val, v.status)

# Lookup a single point value
values = client.values(source_id="s.2")
v = values.point("s.2.4")
print(v.val)

Returns historical trend data for a list of points. Either date or start_date + end_date is required.

trends(point_ids, start_date=None, end_date=None, date=None,
       tz=None, interval=None, aggregate=None)
Argument Default Description
point_ids List of point ID strings (required)
date None Single date as YYYY-MM-DD (takes precedence over start/end)
start_date None Start date as YYYY-MM-DD
end_date None End date as YYYY-MM-DD
tz None Timezone for results (defaults to project timezone)
interval None Resample interval: auto 5min 15min 30min 1hr 1day 1mo raw
aggregate None Aggregation function: auto mean sum min max diff

Returns

TrendData with the following attributes:

Attribute Type Description
start str Start timestamp
end str End timestamp
tz str Timezone of results
interval str Interval used
aggregate str Aggregation function used
point_ids list[str] Point IDs in the response

Each row in TrendData is a TrendRow with:

Attribute Type Description
ts str Timestamp for this interval
values dict Map of point ID to value

Example

# Single day
trends = client.trends(point_ids=["s.2.4", "s.2.5"], date="2026-03-09")
for row in trends:
    print(row.ts, row.values)

# Date range with hourly interval
trends = client.trends(
    point_ids=["s.2.4"],
    start_date="2026-03-01",
    end_date="2026-03-09",
    interval="1hr",
    aggregate="mean",
)
print(trends.interval)   # "1hr"
print(trends.aggregate)  # "mean"