zabgrab.model.query¶
A fully resolved fetch request.
Module Attributes
Label for items given on the command line rather than by a template. |
Classes
|
Everything needed to fetch and save data, with where each value came from. |
|
Items to fetch. |
- zabgrab.model.query.CUSTOM = '__custom'¶
Label for items given on the command line rather than by a template. Template names can’t start with “_”, so it can’t clash.
- class zabgrab.model.query.Request(label, items)[source]¶
Bases:
objectItems to fetch.
The template is a request; items given on the command line form another.
- class zabgrab.model.query.Query(requests, template, server, custom, start, end, from_text, to_text, resolution, agg, formats, output_dir, output_pattern, timezone, tz, jobs, max_items, mat_text_warn_entries, sources=<factory>, answers=<factory>)[source]¶
Bases:
objectEverything needed to fetch and save data, with where each value came from.
- Parameters:
- server¶
The server to fetch from: a name or URL, a choice to ask about, or
None(ask which configured server to use).
- custom¶
Items were added, or data-affecting template values changed, on the command line (or there was no template). Marks automatic file names.
- Type:
- start, end
The time range, as aware UTC datetimes.
- Type:
datetime
- from_text, to_text
The time range as given (e.g.
"24 hours ago").- Type:
- resolution¶
Raw history or hourly trends.
- Type:
- formats¶
Output formats; empty if not set (then taken from the output file name).
- output_dir, output_pattern
Where automatic file names go, and how they’re built.
- Type:
- tz¶
The time zone for times (
Nonefor local time).- Type:
tzinfo or None