baseinfo¶
VERSIONED_BASE_URL_PATTERN = '^.+/v[0-1](\\.[0-9]+)*/?$'
module-attribute
¶
AvailableApiVersion
¶
Bases: BaseModel
A JSON object containing information about an available API version
Source code in optimade/models/baseinfo.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
url: Annotated[AnyHttpUrl, StrictField(description='A string specifying a versioned base URL that MUST adhere to the rules in section Base URL', json_schema_extra={pattern: VERSIONED_BASE_URL_PATTERN})]
instance-attribute
¶
version: Annotated[SemanticVersion, StrictField(description="A string containing the full version number of the API served at that versioned base URL.\nThe version number string MUST NOT be prefixed by, e.g., 'v'.\nExamples: `1.0.0`, `1.0.0-rc.2`.")]
instance-attribute
¶
crosscheck_url_and_version()
¶
Check that URL version and API version are compatible.
Source code in optimade/models/baseinfo.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
url_must_be_versioned_base_Url(value)
classmethod
¶
The URL must be a versioned base URL
Source code in optimade/models/baseinfo.py
38 39 40 41 42 43 44 45 46 47 |
|
BaseInfoAttributes
¶
Bases: BaseModel
Attributes for Base URL Info endpoint
Source code in optimade/models/baseinfo.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
api_version: Annotated[SemanticVersion, StrictField(description='Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., "v".\nExamples: `1.0.0`, `1.0.0-rc.2`.')]
instance-attribute
¶
available_api_versions: Annotated[list[AvailableApiVersion], StrictField(description='A list of dictionaries of available API versions at other base URLs')]
instance-attribute
¶
available_endpoints: Annotated[list[str], StrictField(description='List of available endpoints (i.e., the string to be appended to the versioned base URL).')]
instance-attribute
¶
entry_types_by_format: Annotated[dict[str, list[str]], StrictField(description='Available entry endpoints as a function of output formats.')]
instance-attribute
¶
formats: Annotated[list[str], StrictField(description='List of available output formats.')] = ['json']
class-attribute
instance-attribute
¶
is_index: Annotated[bool | None, StrictField(description='If true, this is an index meta-database base URL (see section Index Meta-Database). If this member is not provided, the client MUST assume this is not an index meta-database base URL (i.e., the default is for `is_index` to be `false`).')] = False
class-attribute
instance-attribute
¶
formats_and_endpoints_must_be_valid()
¶
Source code in optimade/models/baseinfo.py
112 113 114 115 116 117 118 119 120 121 122 |
|
BaseInfoResource
¶
Bases: Resource
Source code in optimade/models/baseinfo.py
125 126 127 128 |
|