sda.dashboard.api.routes.timeseries#

Route for reading timeseries data from the cloud PostgreSQL database.

Attributes#

Functions#

get_timeseries(body)

Load timeseries data from PostgreSQL for tag within the given time window.

get_commentary(body)

Load commentary entries for tag from the commentary table.

Module Contents#

sda.dashboard.api.routes.timeseries.router#
async sda.dashboard.api.routes.timeseries.get_timeseries(body)#

Load timeseries data from PostgreSQL for tag within the given time window.

Credentials are read from ~/sda.json (keys DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME). Returns a flat list of row dicts plus the ordered column list.

async sda.dashboard.api.routes.timeseries.get_commentary(body)#

Load commentary entries for tag from the commentary table.

Credentials are read from ~/sda.json. Entries are filtered by pid_code and optionally by the same time window used for timeseries.