perda.timeline.client#
- class perda.timeline.client.TimelineClient(password=None)[source]#
Bases:
object- Parameters:
password (str | None)
- find(var_key, above=None, below=None, month=None, min_samples=1)[source]#
Find sessions where a variable crossed a threshold. Answered entirely from the summary tier – no raw samples are read.
- Parameters:
var_key (str) – Exact C++ identifier for the variable.
above (float | None) – Keep sessions whose maximum exceeded this.
below (float | None) – Keep sessions whose minimum fell under this.
month (str | None) – Restrict to a month, formatted
"YYYY-MM".min_samples (int) – Ignore sessions with fewer samples than this.
- Returns:
Matching sessions, worst-first.
- Return type:
pl.DataFrame
- load(var_key, session_id=None, test_day=None)[source]#
Load a variable as a PERDA
DataInstancefor plotting and maths.Bridges the timeline back into the existing analysis stack, so a signal pulled from months of history behaves exactly like one parsed from a single log.
- Parameters:
var_key (str) – Exact dotted C++ path.
session_id (int | None) – Restrict to a single session.
test_day (date | None) – Restrict to one test day.
- Returns:
Timestamps in microseconds relative to the session start.
- Return type:
- samples(var_key, session_id=None, test_day=None)[source]#
Fetch raw samples for one variable.
- Parameters:
var_key (str) – Exact dotted C++ path.
session_id (int | None) – Restrict to a single session.
test_day (date | None) – Restrict to one test day.
- Returns:
Columns
session_id,ts_utc,t_rel_usandvalue.- Return type:
pl.DataFrame
- sql(query, params=None, max_rows=1000000)[source]#
- Return type:
DataFrame- Parameters:
query (str)
params (Sequence[object] | None)
max_rows (int)
- stats(var_key, month=None, test_day=None)[source]#
Per-session summary rows for one variable.
- Parameters:
var_key (str) – Exact C++ identifier for the variable.
month (str | None) – Restrict to a month, formatted
"YYYY-MM".test_day (date | None) – Restrict to a single test day.
- Returns:
One row per session, ordered by start time.
- Return type:
pl.DataFrame