httk.store.served_specs¶
Derive OPTIMADE property names and types from the storage schema IR.
This module deliberately depends only on the neutral schema representation and httk-core definitions. SQL and Mongo layers can therefore share the same property derivation without importing one another’s backend.
Functions¶
|
Return the served |
|
Return the OPTIMADE fulltype declared by a property definition. |
Module Contents¶
- httk.store.served_specs.served_specs(schema, prefix)[source]¶
Return the served
(name, field spec, fulltype)triples.- Parameters:
schema (httk.store.db.schema.TableSchema) – The resolved schema whose fields are inspected.
prefix (str) – The registered prefix used for served property names.
- Returns:
One triple for every schema field with an OPTIMADE value type.
- Return type:
- httk.store.served_specs.definition_fulltype(definition)[source]¶
Return the OPTIMADE fulltype declared by a property definition.
- Parameters:
definition (httk.core.PropertyDefinition) – The property definition to inspect.
- Returns:
Its scalar, list, or dictionary fulltype string.
- Return type: