aito.client.v2.responses.V2Response

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

Bases: object

The base class of a v2 API response

Wraps the raw JSON and exposes the parts of the envelope that every kind shares: kind, warnings and meta.

Parameters:

json (Dict) – the parsed JSON response

Methods

Attributes

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 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 = 'rows'

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]