MCPcopy Create free account
hub / github.com/Materials-Consortia/optimade-python-tools / ResponseMeta

Class ResponseMeta

optimade/models/optimade_json.py:287–394  ·  view source on GitHub ↗

A [JSON API meta member](https://jsonapi.org/format/1.0#document-meta) that contains JSON API meta objects of non-standard meta-information. OPTIONAL additional information global to the query that is not specified in this document, MUST start with a database-provider-speci

Source from the content-addressed store, hash-verified

285
286
287class ResponseMeta(jsonapi.Meta):
288 """
289 A [JSON API meta member](https://jsonapi.org/format/1.0#document-meta)
290 that contains JSON API meta objects of non-standard
291 meta-information.
292
293 OPTIONAL additional information global to the query that is not
294 specified in this document, MUST start with a
295 database-provider-specific prefix.
296 """
297
298 query: Annotated[
299 ResponseMetaQuery,
300 StrictField(description="Information on the Query that was requested"),
301 ]
302
303 api_version: Annotated[
304 SemanticVersion,
305 StrictField(
306 description="""Presently used full version of the OPTIMADE API.
307The version number string MUST NOT be prefixed by, e.g., "v".
308Examples: `1.0.0`, `1.0.0-rc.2`.""",
309 ),
310 ]
311
312 more_data_available: Annotated[
313 bool,
314 StrictField(
315 description="`false` if the response contains all data for the request (e.g., a request issued to a single entry endpoint, or a `filter` query at the last page of a paginated response) and `true` if the response is incomplete in the sense that multiple objects match the request, and not all of them have been included in the response (e.g., a query with multiple pages that is not at the last page).",
316 ),
317 ]
318
319 # start of "SHOULD" fields for meta response
320 optimade_schema: Annotated[
321 jsonapi.JsonLinkType | None,
322 StrictField(
323 alias="schema",
324 description="""A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) that points to a schema for the response.
325If it is a string, or a dictionary containing no `meta` field, the provided URL MUST point at an [OpenAPI](https://swagger.io/specification/) schema.
326It is possible that future versions of this specification allows for alternative schema types.
327Hence, if the `meta` field of the JSON API links object is provided and contains a field `schema_type` that is not equal to the string `OpenAPI` the client MUST not handle failures to parse the schema or to validate the response against the schema as errors.""",
328 ),
329 ] = None
330
331 time_stamp: Annotated[
332 datetime | None,
333 StrictField(
334 description="A timestamp containing the date and time at which the query was executed.",
335 ),
336 ] = None
337
338 data_returned: Annotated[
339 int | None,
340 StrictField(
341 description="An integer containing the total number of data resource objects returned for the current `filter` query, independent of pagination.",
342 ge=0,
343 ),
344 ] = None

Callers 1

meta_valuesFunction · 0.90

Calls 1

StrictFieldFunction · 0.90

Tested by

no test coverage detected