httk.optimade.backend.protocols

Typed protocols for the store/searcher contract the OPTIMADE backend uses.

The store/searcher protocols are defined in httk.data.query (httk-data is where httk’s data stores live, and this backend programs against their shared query contract); this module re-exports them for the backend’s use, together with the OPTIMADE-specific query-callable types from the result model.

Classes

QueryFunction

The callback seam through which the request engine runs queries on a backend.

QueryResults

The results of a query against a backend, as consumed by the entry endpoints.

Module Contents

class httk.optimade.backend.protocols.QueryFunction[source]

Bases: Protocol

The callback seam through which the request engine runs queries on a backend.

class httk.optimade.backend.protocols.QueryResults[source]

Bases: Protocol

The results of a query against a backend, as consumed by the entry endpoints.

Iteration yields one ResultRow per entry; its values map OPTIMADE response-field names to values, and the id and type keys are always present.

more_data_available: bool
count() int[source]