httk.serve.optimade.endpoints.partial_data

The partial data endpoint, streaming large property values as JSON Lines.

See the OPTIMADE specification appendix “OPTIMADE JSON Lines partial data format”. A backend exposes a large or sliceable property value as a PartialValue; this endpoint fetches it in chunks of config.partial_data_chunk_size outer items and emits the JSON Lines document, with a next-marker when more data remains.

Functions

generate_partial_data_reply(request, config, ...)

Produce the JSON Lines partial-data reply for one property value.

Module Contents

httk.serve.optimade.endpoints.partial_data.generate_partial_data_reply(request, config, query_function, schema)[source]

Produce the JSON Lines partial-data reply for one property value.

Parameters:
Returns:

JSON Lines response.

Raises:

httk.serve.optimade.model.errors.OptimadeError – If the entry, property, or partial-data length is unavailable.

Return type:

httk.serve.optimade.model.request.EndpointResponse