OTEAPI DLite Plugin Strategies¶
This page provides documentation for the oteapi_dlite.strategies
submodule, where all the OTEAPI DLite Plugin strategies are located.
These strategies will be available when setting up a server in an environment with oteapi-dlite installed.
convert
¶
Generic function strategy that converts zero or more input instances to zero or more new output instances.
DLiteConvertConfig
¶
Bases: FunctionConfig
DLite convert strategy resource config.
Source code in oteapi_dlite/strategies/convert.py
120 121 122 123 124 125 126 |
|
configuration: Annotated[DLiteConvertStrategyConfig, Field(description='DLite convert strategy-specific configuration.')]
instance-attribute
¶
DLiteConvertInputConfig
¶
Bases: AttrDict
Configuration for input instance to generic DLite converter.
At least one of label
or datamodel
should be given.
Source code in oteapi_dlite/strategies/convert.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
datamodel: Annotated[Optional[str], Field(description='URI of data model.')] = None
class-attribute
instance-attribute
¶
label: Annotated[Optional[str], Field(description='Label of the instance.')] = None
class-attribute
instance-attribute
¶
property_mappings: Annotated[bool, Field(description='Whether to infer instance from property mappings.')] = False
class-attribute
instance-attribute
¶
DLiteConvertOutputConfig
¶
Bases: AttrDict
Configuration for output instance to generic DLite converter.
Source code in oteapi_dlite/strategies/convert.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
DLiteConvertStrategy
¶
Generic DLite convert strategy for converting zero or more input instances to zero or more output instances.
Registers strategies:
("functionType", "application/vnd.dlite-convert")
Source code in oteapi_dlite/strategies/convert.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
convert_config: DLiteConvertConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
This method will be called through the strategy-specific endpoint of the OTE-API Services.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Optional[dict[str, Any]]
|
A session-specific dictionary context. |
None
|
Returns:
Type | Description |
---|---|
DLiteSessionUpdate
|
SessionUpdate instance. |
Source code in oteapi_dlite/strategies/convert.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/convert.py
142 143 144 145 146 147 |
|
DLiteConvertStrategyConfig
¶
Bases: AttrDict
Configuration for generic DLite converter.
Source code in oteapi_dlite/strategies/convert.py
66 67 68 69 70 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 |
|
function_name: Annotated[str, Field(description='Name of convert function. It will be pased the input instances as arguments and should return a sequence of output instances.')]
instance-attribute
¶
inputs: Annotated[Sequence[DLiteConvertInputConfig], Field(description='Input instances.')] = []
class-attribute
instance-attribute
¶
module_name: Annotated[str, Field(description='Name of Python module containing the convertion function.')]
instance-attribute
¶
outputs: Annotated[Sequence[DLiteConvertOutputConfig], Field(description='Output instances.')] = []
class-attribute
instance-attribute
¶
package: Annotated[Optional[str], Field(description='Used when performing a relative import of the converter function. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import.')] = None
class-attribute
instance-attribute
¶
pypi_package: Annotated[Optional[str], Field(description='Package name on PyPI. This field is currently only informative, but might be used in the future for automatic package installation.')] = None
class-attribute
instance-attribute
¶
filter
¶
Filter that removes all but specified instances in the collection.
DLiteFilterConfig
¶
Bases: FilterConfig
DLite generate strategy config.
Source code in oteapi_dlite/strategies/filter.py
81 82 83 84 85 86 87 |
|
configuration: Annotated[DLiteQueryConfig, Field(description='DLite filter strategy-specific configuration.')]
instance-attribute
¶
DLiteFilterStrategy
¶
Filter that removes all but specified instances in the collection.
The query
configuration should be a regular expression matching labels
to keep in the collection. All other labels will be removed.
Registers strategies:
("filterType", "dlite/filter")
Source code in oteapi_dlite/strategies/filter.py
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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
filter_config: DLiteFilterConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
Source code in oteapi_dlite/strategies/filter.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/filter.py
105 106 107 108 109 110 |
|
DLiteQueryConfig
¶
Bases: AttrDict
Configuration for the DLite filter strategy.
First the remove_label
and remove_datamodel
configurations are
used to mark matching instances for removal. If neither
remove_label
or remove_datamodel
are given, all instances are
marked for removal.
Then instances matching keep_label
and keep_datamodel
are unmarked
for removal.
If keep_referred
is true, any instance that is referred to by
an instance not marked for removal is also unmarked for removal.
Finally, the instances that are still marked for removal are removed from the collection.
Source code in oteapi_dlite/strategies/filter.py
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 69 70 71 72 73 74 75 76 77 78 |
|
keep_datamodel: Annotated[Optional[str], Field(description='Regular expression matching datamodel URIs to keep in collection. This configuration overrides `remove_label` and `remove_datamodel`.')] = None
class-attribute
instance-attribute
¶
keep_label: Annotated[Optional[str], Field(description='Regular expression matching labels to keep. This configuration overrides `remove_label` and `remove_datamodel`. Alias for the FilterStrategy `query` configuration, that is inherited from the oteapi-core Filter data model.')] = None
class-attribute
instance-attribute
¶
keep_referred: Annotated[bool, Field(description='Whether to keep all instances in the collection that are directly or indirectly referred to (via ref-types or collections) by kept instances.')] = True
class-attribute
instance-attribute
¶
remove_datamodel: Annotated[Optional[str], Field(description='Regular expression matching datamodel URIs to remove.')] = None
class-attribute
instance-attribute
¶
remove_label: Annotated[Optional[str], Field(description='Regular expression matching labels to remove.')] = None
class-attribute
instance-attribute
¶
generate
¶
Generic generate strategy using DLite storage plugin.
DLiteGenerateConfig
¶
Bases: FunctionConfig
DLite generate strategy config.
Source code in oteapi_dlite/strategies/generate.py
115 116 117 118 119 120 121 |
|
configuration: Annotated[DLiteStorageConfig, Field(description='DLite generate strategy-specific configuration.')]
instance-attribute
¶
DLiteGenerateStrategy
¶
Generic DLite generate strategy utilising DLite storage plugins.
Registers strategies:
("mediaType", "application/vnd.dlite-generate")
Source code in oteapi_dlite/strategies/generate.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
|
generate_config: DLiteGenerateConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
This method will be called through the strategy-specific endpoint of the OTE-API Services.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Optional[dict[str, Any]]
|
A session-specific dictionary context. |
None
|
Returns:
Type | Description |
---|---|
DLiteSessionUpdate
|
SessionUpdate instance. |
Source code in oteapi_dlite/strategies/generate.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/generate.py
136 137 138 139 140 141 |
|
DLiteStorageConfig
¶
Bases: AttrDict
Configuration for a generic DLite storage filter.
The DLite storage driver to can be specified using either the driver
or mediaType
field.
Where the output should be written, is specified using either the
location
or datacache_config.accessKey
field.
Either label
or datamodel
should be provided.
Source code in oteapi_dlite/strategies/generate.py
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 69 70 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 |
|
allow_incomplete: Annotated[Optional[bool], Field(description='Whether to allow incomplete property mappings.')] = False
class-attribute
instance-attribute
¶
collection_id: Annotated[Optional[str], Field(description='ID of the collection to use.')] = None
class-attribute
instance-attribute
¶
datacache_config: Annotated[Optional[DataCacheConfig], Field(description='Configuration options for the local data cache.')] = None
class-attribute
instance-attribute
¶
datamodel: Annotated[Optional[str], Field(description='URI to the datamodel of the new instance. Needed when generating the instance from mappings. Cannot be combined with `label`')] = None
class-attribute
instance-attribute
¶
driver: Annotated[Optional[str], Field(description='Name of DLite driver (ex: "json").')] = None
class-attribute
instance-attribute
¶
label: Annotated[Optional[str], Field(description='Label of DLite instance in the collection to serialise.')] = None
class-attribute
instance-attribute
¶
location: Annotated[Optional[str], Field(description="Location of storage to write to. If unset to store in data cache using the key provided with `datacache_config.accessKey` (defaults to 'generate_data').")] = None
class-attribute
instance-attribute
¶
mediaType: Annotated[Optional[str], Field(description='Media type for DLite driver (ex: "application/json").')] = None
class-attribute
instance-attribute
¶
options: Annotated[Optional[str], Field(description='Comma-separated list of options passed to the DLite storage plugin.')] = None
class-attribute
instance-attribute
¶
store_collection: Annotated[bool, Field(description='Whether to store the entire collection in the session instead of a single instance. Cannot be combined with `label` or `datamodel`.')] = False
class-attribute
instance-attribute
¶
store_collection_id: Annotated[Optional[str], Field(description='Used together with `store_collection` If given, store a copy of the collection with this id.')] = None
class-attribute
instance-attribute
¶
mapping
¶
Mapping filter strategy.
DLiteMappingConfig
¶
Bases: MappingConfig
DLite mapping strategy config.
Source code in oteapi_dlite/strategies/mapping.py
29 30 31 32 33 34 35 36 37 |
|
configuration: Annotated[DLiteMappingStrategyConfig, Field(description='DLite mapping strategy-specific configuration.')] = DLiteMappingStrategyConfig()
class-attribute
instance-attribute
¶
DLiteMappingStrategy
¶
Strategy for a mapping.
Registers strategies:
("mappingType", "mappings")
Source code in oteapi_dlite/strategies/mapping.py
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 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
mapping_config: DLiteMappingConfig
instance-attribute
¶
get(session=None)
¶
Execute strategy and return a dictionary.
Source code in oteapi_dlite/strategies/mapping.py
77 78 79 80 81 |
|
initialize(session=None)
¶
Initialize strategy.
Source code in oteapi_dlite/strategies/mapping.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
DLiteMappingStrategyConfig
¶
Bases: AttrDict
Configuration for a DLite mapping filter.
Source code in oteapi_dlite/strategies/mapping.py
18 19 20 21 22 23 24 25 26 |
|
datamodel: Annotated[Optional[AnyUrl], Field(description='URI of the datamodel that is mapped.')] = None
class-attribute
instance-attribute
¶
parse
¶
Generic parse strategy using DLite storage plugin.
DLiteParseConfig
¶
Bases: AttrDict
Configuration for generic DLite parser.
Source code in oteapi_dlite/strategies/parse.py
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 |
|
datacache_config: Annotated[Optional[DataCacheConfig], Field(description='Configuration options for the local data cache.')] = None
class-attribute
instance-attribute
¶
driver: Annotated[Optional[str], Field(description='Name of DLite driver (ex: "json").')] = None
class-attribute
instance-attribute
¶
id: Annotated[Optional[str], Field(description='If given, the id of the instance in the storage.')] = None
class-attribute
instance-attribute
¶
label: Annotated[str, Field(description='Label of the new DLite instance in the collection.')]
instance-attribute
¶
location: Annotated[Optional[str], Field(description="Explicit location of storage. Normally data is read from the data cache using `datacache_config.accessKey` (default: 'key').")] = None
class-attribute
instance-attribute
¶
options: Annotated[Optional[str], Field(description='Comma-separated list of options passed to the DLite storage plugin.')] = None
class-attribute
instance-attribute
¶
DLiteParseResourceConfig
¶
Bases: ResourceConfig
DLite parse strategy resource config.
Source code in oteapi_dlite/strategies/parse.py
68 69 70 71 72 73 74 |
|
configuration: Annotated[DLiteParseConfig, Field(description='DLite parse strategy-specific configuration.')]
instance-attribute
¶
DLiteParseStrategy
¶
Generic DLite parse strategy utilising DLite storage plugins.
Registers strategies:
("mediaType", "application/vnd.dlite-parse")
Source code in oteapi_dlite/strategies/parse.py
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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
parse_config: DLiteParseResourceConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
This method will be called through the strategy-specific endpoint of the OTE-API Services.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Optional[dict[str, Any]]
|
A session-specific dictionary context. |
None
|
Returns:
Type | Description |
---|---|
DLiteSessionUpdate
|
SessionUpdate instance. |
Source code in oteapi_dlite/strategies/parse.py
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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/parse.py
89 90 91 92 93 94 |
|
parse_excel
¶
Strategy for parsing an Excel spreadsheet to a DLite instance.
DLiteExcelParseConfig
¶
Bases: AttrDict
Configuration for DLite Excel parser.
Source code in oteapi_dlite/strategies/parse_excel.py
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 |
|
excel_config: Annotated[XLSXParseConfig, Field(description='DLite-specific excel configurations.')]
instance-attribute
¶
id: Annotated[Optional[str], Field(description='Optional id on new instance.')] = None
class-attribute
instance-attribute
¶
label: Annotated[Optional[str], Field(description='Optional label for new instance in collection.')] = 'excel-data'
class-attribute
instance-attribute
¶
metadata: Annotated[Optional[HttpUrl], Field(description='URI of DLite metadata to return. If not provided, the metadata will be inferred from the excel file.')] = None
class-attribute
instance-attribute
¶
storage_path: Annotated[Optional[str], Field(description='Path to metadata storage')] = None
class-attribute
instance-attribute
¶
DLiteExcelParseResourceConfig
¶
Bases: ResourceConfig
DLite excel parse strategy resource config.
Source code in oteapi_dlite/strategies/parse_excel.py
66 67 68 69 70 71 72 |
|
configuration: Annotated[DLiteExcelParseConfig, Field(description='DLite excel parse strategy-specific configuration.')]
instance-attribute
¶
DLiteExcelSessionUpdate
¶
Bases: DLiteSessionUpdate
Class for returning values from DLite excel parser.
Source code in oteapi_dlite/strategies/parse_excel.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
DLiteExcelStrategy
¶
Parse strategy for Excel files.
Registers strategies:
("mediaType", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
Source code in oteapi_dlite/strategies/parse_excel.py
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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
parse_config: DLiteExcelParseResourceConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
This method will be called through the strategy-specific endpoint of the OTE-API Services.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Optional[dict[str, Any]]
|
A session-specific dictionary context. |
None
|
Returns:
Type | Description |
---|---|
DLiteExcelSessionUpdate
|
DLite instance. |
Source code in oteapi_dlite/strategies/parse_excel.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/parse_excel.py
105 106 107 108 109 110 |
|
infer_metadata(rec, units)
¶
Infer dlite metadata from recarray rec
.
Source code in oteapi_dlite/strategies/parse_excel.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
split_column_name(column)
¶
Split column name into a (name, unit) tuple.
Source code in oteapi_dlite/strategies/parse_excel.py
173 174 175 176 177 178 179 |
|
parse_image
¶
Strategy class for parsing an image to a DLite instance.
LOGGER = logging.getLogger('oteapi_dlite.strategies')
module-attribute
¶
DLiteImageConfig
¶
Bases: ImageParserConfig
Configuration for DLite image parser.
Source code in oteapi_dlite/strategies/parse_image.py
29 30 31 32 33 34 35 36 37 |
|
image_label: Annotated[str, Field(description='Label to assign to the image in the collection.')] = 'image'
class-attribute
instance-attribute
¶
DLiteImageParseStrategy
¶
Parse strategy for image files.
Registers strategies:
("mediaType", "image/vnd.dlite-gif")
("mediaType", "image/vnd.dlite-jpeg")
("mediaType", "image/vnd.dlite-jpg")
("mediaType", "image/vnd.dlite-jp2")
("mediaType", "image/vnd.dlite-png")
("mediaType", "image/vnd.dlite-tiff")
Source code in oteapi_dlite/strategies/parse_image.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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 123 124 125 126 127 128 129 130 131 132 |
|
parse_config: DLiteImageResourceConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
This method will be called through the strategy-specific endpoint of the OTE-API Services. It assumes that the image to parse is stored in a data cache, and can be retrieved via a key that is supplied in either the session (highest priority) or in the parser configuration (lowest priority).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session |
Optional[dict[str, Any]]
|
A session-specific dictionary context. |
None
|
Returns:
Type | Description |
---|---|
DLiteSessionUpdate
|
DLite instance. |
Source code in oteapi_dlite/strategies/parse_image.py
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 123 124 125 126 127 128 129 130 131 132 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/parse_image.py
68 69 70 71 72 |
|
DLiteImageResourceConfig
¶
Bases: ResourceConfig
Resource config for DLite image parser.
Source code in oteapi_dlite/strategies/parse_image.py
40 41 42 43 44 45 46 47 48 |
|
configuration: Annotated[DLiteImageConfig, Field(description='Image parse strategy-specific configuration.')] = DLiteImageConfig()
class-attribute
instance-attribute
¶
serialise
¶
Filter for serialisation using DLite.
SerialiseConfig
¶
Bases: AttrDict
DLite serialise-specific configurations.
Source code in oteapi_dlite/strategies/serialise.py
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 |
|
driver: Annotated[str, Field(description='Name of DLite plugin used for serialisation.')]
instance-attribute
¶
labels: Annotated[Optional[Sequence[str]], Field(None, description='Optional sequence of labels in the collection to serialise. The default is to serialise the entire collection.')] = None
class-attribute
instance-attribute
¶
location: Annotated[Path, Field(description='Path or URL to serialise to.')]
instance-attribute
¶
options: Annotated[Optional[str], Field(description='Options passed to the driver.')] = ''
class-attribute
instance-attribute
¶
SerialiseFilterConfig
¶
Bases: FilterConfig
Filter config for serialise.
Source code in oteapi_dlite/strategies/serialise.py
52 53 54 55 56 57 58 59 60 |
|
configuration: Annotated[SerialiseConfig, Field(description='Serialise-specific configurations.')]
instance-attribute
¶
SerialiseStrategy
¶
Filter for serialisation using DLite.
Registers strategies:
("filterType", "dlite_serialise")
Source code in oteapi_dlite/strategies/serialise.py
63 64 65 66 67 68 69 70 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 |
|
filter_config: SerialiseFilterConfig
instance-attribute
¶
get(session=None)
¶
Execute the strategy.
Source code in oteapi_dlite/strategies/serialise.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
initialize(session=None)
¶
Initialize.
Source code in oteapi_dlite/strategies/serialise.py
75 76 77 78 79 |
|