httk.serve.optimade.client¶
Synchronous, read-only discovery for remote OPTIMADE services.
This module establishes lossless schema snapshots and strict definition-IRI
recognition. Query construction and paginated execution live in
remote_query and are imported lazily by OptimadeStore.searcher().
Attributes¶
Exceptions¶
Base class for safe, client-side OPTIMADE failures. |
|
The HTTP client could not complete a request. |
|
A remote endpoint returned a non-success HTTP status. |
|
A non-success response supplied a parseable OPTIMADE |
|
An |
|
An OPTIMADE base URL could not be negotiated to a supported API version. |
Classes¶
One immutable remote entry endpoint discovered from |
|
A synchronous read-only OPTIMADE service connection with eager discovery. |
Module Contents¶
- exception httk.serve.optimade.client.OptimadeClientError[source]¶
Bases:
RuntimeErrorBase class for safe, client-side OPTIMADE failures.
- exception httk.serve.optimade.client.OptimadeTransportError(source_url: str, detail: str)[source]¶
Bases:
OptimadeClientErrorThe HTTP client could not complete a request.
- exception httk.serve.optimade.client.OptimadeHTTPError(source_url: str, status_code: int, detail: str | None = None)[source]¶
Bases:
OptimadeClientErrorA remote endpoint returned a non-success HTTP status.
- exception httk.serve.optimade.client.OptimadeErrorDocumentError(source_url: str, status_code: int, detail: str | None = None)[source]¶
Bases:
OptimadeHTTPErrorA non-success response supplied a parseable OPTIMADE
errorsdocument.
- exception httk.serve.optimade.client.OptimadeDiscoveryError(source_url: str, detail: str)[source]¶
Bases:
OptimadeClientErrorAn
/infodocument was malformed or inconsistent for discovery.
- exception httk.serve.optimade.client.OptimadeVersionNegotiationError(source_url: str, detail: str)[source]¶
Bases:
OptimadeClientErrorAn OPTIMADE base URL could not be negotiated to a supported API version.
- class httk.serve.optimade.client.RemoteEntryType[source]¶
One immutable remote entry endpoint discovered from
/info.nameis solely the service’s transport endpoint name. Semantic recognition is intentionally represented bybindingand is derived exclusively from definition IRIs.- property_iris: collections.abc.Mapping[str, str][source]¶
- property_names: collections.abc.Mapping[str, str][source]¶
- binding: httk.core.OptimadeEntryBinding | None[source]¶
- class httk.serve.optimade.client.OptimadeStore(base_url: str, *, client: object | None = None, page_limit: int = 100, max_pages: int = 10000, allow_cross_origin_pagination: bool = False, response_fields: object | None = None)[source]¶
A synchronous read-only OPTIMADE service connection with eager discovery.
- property entry_types: tuple[RemoteEntryType, Ellipsis][source]¶
Discovered entry endpoints in the service-advertised order.
- property entry_types_by_name: collections.abc.Mapping[str, RemoteEntryType][source]¶
An immutable transport-name lookup for
entry_types.
- entry_type(name: str) RemoteEntryType[source]¶
Return one discovered endpoint by its transport name.
- searcher(*, response_fields: object = ...) httk.serve.optimade.remote_query.RemoteSearcher[source]¶
Create one synchronous, read-only remote search plan.
Passing
response_fieldsoverrides the store-level selection. An omitted value inherits it, while explicitNonerequests the service default.