aito.client.v2.responses.V2AggregateResponse

class aito.client.v2.responses.V2AggregateResponse(json: Dict)

Bases: V2Response

An aggregate response — a small object of aggregate results

Keys are the requested aggregate expressions (amount.$mean), alongside the derived ones the engine adds (amount.$mean.samples, amount.$mean.variance, .standardDeviation, .standardError).

Parameters:

json (Dict) – the parsed JSON response

Methods

Attributes

data

the aggregate results

engine

which engine answered, if the client requested meta

json

the raw JSON response

kind

the result kind this response class represents

meta

the response metadata, empty unless the client was built with meta=True

warnings

the non-fatal notes the engine attached to this response

property data: Dict

the aggregate results

Return type:

Dict

property engine: str | None

which engine answered, if the client requested meta

Return type:

Optional[str]

property json: Dict

the raw JSON response

Return type:

Dict

kind: str = 'aggregate'

the result kind this response class represents

property meta: Dict

the response metadata, empty unless the client was built with meta=True

Currently carries enginev2 for a collection served by the rep2 engine, v1 for a legacy table served by the compatibility shim.

Return type:

Dict

property warnings: List[V2Warning]

the non-fatal notes the engine attached to this response

Empty for the great majority of responses. Worth checking when a result is unexpectedly broad or unexpectedly empty — the engine reports a where it could not apply here rather than failing the request.

Return type:

List[V2Warning]