aito.client.v2.responses.V2BatchResponse
- class aito.client.v2.responses.V2BatchResponse(json: Dict)
Bases:
V2ResponseA
batchresponse — an array of typed sub-resultsEach element is itself a full typed response, so a caller dispatches per element with
response_for_kind().In practice the engine returns a bare JSON array here, not the
{"kind": "batch", "data": [...]}envelope the response-format spec documents. Both are accepted: the bare array is what actually arrives today, and the envelope is what the spec promises, so the class keeps working if the engine is brought in line. Filed against the engine.- Parameters:
json (Dict) – the parsed JSON response
Methods
Attributes
the raw sub-results
which engine answered, if the client requested
metathe raw JSON response
the result kind this response class represents
the response metadata, empty unless the client was built with
meta=Truethe sub-results, each parsed into its own response class
the non-fatal notes the engine attached to this response
- property data: List[Dict]
the raw sub-results
- Return type:
List[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 = 'batch'
the result kind this response class represents
- property meta: Dict
the response metadata, empty unless the client was built with
meta=TrueCurrently carries
engine—v2for a collection served by the rep2 engine,v1for a legacy table served by the compatibility shim.- Return type:
Dict
- property responses: List[V2Response]
the sub-results, each parsed into its own response class
- Return type:
List[V2Response]
- 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
whereit could not apply here rather than failing the request.- Return type:
List[V2Warning]