httk.serve.web.widgets.optimade_fields¶
A server-side-static table of OPTIMADE property definitions.
Unlike optimade_table this widget performs no browser fetch and ships no
JavaScript: the served schema’s property definitions are known at startup, so
the table is rendered once from the properties mapping a site supplies.
Attributes¶
Functions¶
|
Render a static table of OPTIMADE property definitions. |
Module Contents¶
- httk.serve.web.widgets.optimade_fields.render(context, *, properties, caption='Field definitions')[source]¶
Render a static table of OPTIMADE property definitions.
Each row links a property’s prefixed name to the human-readable definition page at its
$idand shows the first paragraph of itsdescription. Ad-hoc synthesized ids (whose path contains/ad-hoc/) and any non HTTP(S) id render the name as plain text rather than a link.- Parameters:
context (httk.serve.web.widgets.core.WidgetContext) – Immutable widget invocation context.
properties (object) – Mapping of served property name to its OPTIMADE property-definition mapping (each carrying
$idanddescription).caption (str) – Accessible table caption.
- Returns:
Static field-definition table and its stylesheet asset.
- Raises:
OptimadeTableProtocolError – If
propertiesis not a non-empty mapping of at most 512 identifier-named definition mappings.- Return type: