httk.serve.optimade.endpoints.info

Generate OPTIMADE discovery and provider-link responses.

Functions

generate_info_endpoint_reply(request, config, schema)

Build the service /info response.

generate_entry_info_endpoint_reply(request, config, ...)

Build the /info/{entry} response for one served entry type.

generate_base_endpoint_reply(request, config)

Build the HTML response for the unversioned API base endpoint.

generate_versions_endpoint_reply(request, config)

Build the preference-ordered CSV of supported API major versions.

generate_links_endpoint_reply(request, config)

Build the provider-links response.

Module Contents

httk.serve.optimade.endpoints.info.generate_info_endpoint_reply(request, config, schema)[source]

Build the service /info response.

Parameters:
Returns:

JSON:API service-info document.

Return type:

dict[str, Any]

httk.serve.optimade.endpoints.info.generate_entry_info_endpoint_reply(request, config, entry, schema)[source]

Build the /info/{entry} response for one served entry type.

Parameters:
Returns:

JSON:API entry-info document.

Return type:

dict[str, Any]

httk.serve.optimade.endpoints.info.generate_base_endpoint_reply(request, config)[source]

Build the HTML response for the unversioned API base endpoint.

Parameters:
Returns:

HTML response body.

Return type:

str

httk.serve.optimade.endpoints.info.generate_versions_endpoint_reply(request, config)[source]

Build the preference-ordered CSV of supported API major versions.

Parameters:
Returns:

Restricted /versions CSV body.

Return type:

str

Build the provider-links response.

Parameters:
Returns:

JSON:API links document.

Return type:

dict[str, Any]