httk.serve.optimade.model.config¶
Classes¶
Configure a served OPTIMADE database. |
|
Configure an OPTIMADE index meta-database. |
Module Contents¶
- class httk.serve.optimade.model.config.OptimadeConfig[source]¶
Configure a served OPTIMADE database.
implementationextends/overrides the fields of themeta->implementationdictionary (e.g.issue_tracker,source_url,maintainer).database,schema_url, andrequest_delaypopulate the corresponding optionalmetafields (OPTIMADE v1.2+) when set.license,available_licenses, andavailable_licenses_for_entriespopulate the corresponding optional base-info attributes when set.- Parameters:
provider – Provider metadata for the OPTIMADE response envelope.
links – Provider links exposed by the
/linksendpoint.implementation – Implementation metadata merged into response metadata.
database – Optional database metadata for response metadata.
schema_url – URL of the served schema, when one is available.
request_delay – Optional advertised request delay.
license – License metadata exposed by the base-info endpoint.
available_licenses – Licenses advertised for the service.
available_licenses_for_entries – Licenses advertised for entries.
page_limit_max – Largest
page_limitaccepted; larger requests get a 403.partial_data_chunk_size – Number of outer items emitted per partial-data page.
cors_origins – Exact browser origins allowed to make cross-origin requests.
- Raises:
ValueError – If
page_limit_maxis not an integer >= 1.
- class httk.serve.optimade.model.config.OptimadeIndexConfig[source]¶
Bases:
OptimadeConfigConfigure an OPTIMADE index meta-database.
The links are the configured databases advertised by the index. Exactly one must have
link_type == "root"; child links are the databases that may be selected as the index’s default relationship. The regularOptimadeConfigremains a non-index service configuration.- Parameters:
default_link_id – Identifier of the default configured child link, or
Nonewhen the index has no default.- Raises:
ValueError – If configured links do not satisfy the links schema or the root/default-link constraints.