File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 22This module contains the asynchronous API to interface with Obelisk CORE.
33These methods all return a :class:`Awaitable`.
44
5- Relevant entrance points are :class:`Core `.
5+ Relevant entrance points are :class:`Client `.
66
77This API vaguely resembles that of clients to previous Obelisk versions,
88but also significantly diverts from it where the underlying Obelisk CORE API does so.
@@ -159,7 +159,7 @@ class QueryResult(BaseModel):
159159 items : List [Datapoint ]
160160
161161
162- class Core (BaseClient ):
162+ class Client (BaseClient ):
163163 page_limit : int = 250
164164 """How many datapoints to request per page in a cursored fetch"""
165165
Original file line number Diff line number Diff line change 1+ """
2+ Types specific to Obelisk CORE, including an RSQL filter implementation
3+
4+ To create a filter, look at :class:`Filter`.
5+ Example:
6+
7+ >>> from datetime import datetime
8+ >>> f = (Filter().add_and(
9+ ... Comparison.equal('source', 'test source'),
10+ ... Comparison.is_in('metricType', ['number', 'number[]']),
11+ ... ).add_or(
12+ ... Comparison.less('timestamp', datetime.fromtimestamp(1757422128))
13+ ... ))
14+ >>> print(f)
15+ ((('source'=='test source');('metricType'=in=('number', 'number[]'))),('timestamp'<'2025-09-09T14:48:48'))
16+ """
117from __future__ import annotations
218from abc import ABC
319from datetime import datetime
420from typing import Any , Iterable , List
521
622
723FieldName = str # TODO: validate field names?
8- """https://obelisk.pages.ilabt.imec.be/obelisk-core/query.html#available-data-point-fields"""
24+ """https://obelisk.pages.ilabt.imec.be/obelisk-core/query.html#available-data-point-fields
25+ Field names are not validated at this time, due to the inherent complexity.
26+ """
927
1028
1129class Constraint (ABC ):
You can’t perform that action at this time.
0 commit comments