config¶
This submodule defines constant values and definitions from the OPTIMADE specification for use by the validator.
The VALIDATOR_CONFIG object can be imported and modified before calling the validator inside a Python script to customise the hardcoded values.
  ValidatorConfig (BaseSettings)   pydantic-model  ¶
 This class stores validator config parameters in a way that can be easily modified for testing niche implementations. Many of these fields are determined by the specification directly, but it may be desirable to modify them in certain cases.
 entry_endpoints: Set[str]  pydantic-field  ¶
 The entry endpoints to validate, if present in the API's /info response entry_types_by_format['json']
 entry_schemas: Dict[str, Any]  pydantic-field  ¶
 The entry listing endpoint schemas
 enum_fallback_values: Dict[str, Dict[str, List[str]]]  pydantic-field  ¶
 Provide fallback values for enum fields to use when validating filters.
 exclusive_operators: Dict[optimade.models.optimade_json.DataType, Set[str]]  pydantic-field  ¶
 Dictionary mapping OPTIMADE DataTypes to a list of operators that are 'exclusive', i.e. those that should not return entries with the matching value from the filter.
 inclusive_operators: Dict[optimade.models.optimade_json.DataType, Set[str]]  pydantic-field  ¶
 Dictionary mapping OPTIMADE DataTypes to a list of operators that are 'inclusive', i.e. those that should return entries with the matching value from the filter.
 info_endpoint: str  pydantic-field  ¶
 The name of the info endpoint
 links_endpoint: str  pydantic-field  ¶
 The name of the links endpoint
 non_entry_endpoints: Set[str]  pydantic-field  ¶
 The list specification-mandated endpoint names that do not contain entries
 response_classes: Dict[str, Any]  pydantic-field  ¶
 Dictionary containing the mapping between endpoints and response classes for the main database
 response_classes_index: Dict[str, Any]  pydantic-field  ¶
 Dictionary containing the mapping between endpoints and response classes for the index meta-database
 top_level_non_attribute_fields: Set[str]  pydantic-field  ¶
 Field names to treat as top-level
 unique_properties: Set[str]  pydantic-field  ¶
 Fields that should be treated as unique indexes for all endpoints, i.e. fields on which filters should return at most one entry.
 versions_endpoint: str  pydantic-field  ¶
 The name of the versions endpoint