OTE-API Configuration Models¶
This page provides documentation for the oteapi.models submodule, where all the OTE-API strategy configuration data models are located.
When creating instances of these models, the data types are automatically validated.
oteapi.models module.
This module contains all the pydantic configuration models.
AttrDict
¶
Bases: BaseModel, Mapping
An object whose attributes can also be accessed through subscription, like with a dictionary.
Source code in oteapi/models/genericconfig.py
10 11 12 13 14 15 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 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 | |
Config
¶
Class for configuration of pydantic models.
Source code in oteapi/models/genericconfig.py
14 15 16 17 | |
__contains__(self, name)
¶
Enable using the 'in' operator on this object.
Source code in oteapi/models/genericconfig.py
19 20 21 | |
__delitem__(self, key)
¶
Enable deletion access through subscription.
Source code in oteapi/models/genericconfig.py
23 24 25 26 27 28 29 30 31 | |
__getitem__(self, key)
¶
Enable read access through subscription.
Source code in oteapi/models/genericconfig.py
33 34 35 36 37 | |
__iter__(self)
¶
Enable **unpacking.
Source code in oteapi/models/genericconfig.py
57 58 59 | |
__len__(self)
¶
Return number of items.
Source code in oteapi/models/genericconfig.py
53 54 55 | |
__setattr__(self, name, value)
¶
Extend BaseModel.setattr with type-checking.
Source code in oteapi/models/genericconfig.py
39 40 41 42 43 44 45 46 47 | |
__setitem__(self, key, value)
¶
Enable write access through subscription.
Source code in oteapi/models/genericconfig.py
49 50 51 | |
get(self, key, default=None)
¶
Mapping get-method.
Source code in oteapi/models/genericconfig.py
73 74 75 | |
items(self)
¶
Return a view of all (key, value) pairs.
Source code in oteapi/models/genericconfig.py
61 62 63 | |
keys(self)
¶
Return a view of all keys.
Source code in oteapi/models/genericconfig.py
65 66 67 | |
update(self, other=None, **kwargs)
¶
MutableMapping update-method.
Source code in oteapi/models/genericconfig.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
values(self)
¶
Return a view of all values.
Source code in oteapi/models/genericconfig.py
69 70 71 | |
DataCacheConfig
¶
Bases: AttrDict
DataCache Configuration.
This class should not be used directly as a configuration object for a strategy object, but only as a configuration field inside a configuration object.
Source code in oteapi/models/datacacheconfig.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
FilterConfig
¶
Bases: GenericConfig
Filter Strategy Data Configuration.
Source code in oteapi/models/filterconfig.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
FunctionConfig
¶
Bases: GenericConfig
Function Strategy Data Configuration.
Source code in oteapi/models/functionconfig.py
7 8 9 10 11 12 13 | |
GenericConfig
¶
Bases: BaseModel
Generic class for configuration objects.
Source code in oteapi/models/genericconfig.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
__init_subclass__(cls)
¶
Initialize subclass descriptions with their docstrings.
Source code in oteapi/models/genericconfig.py
116 117 118 119 | |
MappingConfig
¶
Bases: GenericConfig
Mapping Strategy Data Configuration.
Source code in oteapi/models/mappingconfig.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
ResourceConfig
¶
Bases: GenericConfig
Important
Either of the pairs of attributes downloadUrl/mediaType or
accessUrl/accessService MUST be specified.
Resource Strategy Data Configuration.
Source code in oteapi/models/resourceconfig.py
15 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 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 | |
ensure_unique_url_pairs(cls, values)
¶
Ensure either downloadUrl/mediaType or accessUrl/accessService are defined. It's fine to define them all, but at least one complete pair MUST be specified.
Source code in oteapi/models/resourceconfig.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
SessionUpdate
¶
Bases: AttrDict
Session Update Data Model for returning values.
Source code in oteapi/models/sessionupdate.py
5 6 | |
TransformationConfig
¶
Bases: GenericConfig
Transformation Strategy Data Configuration.
Source code in oteapi/models/transformationconfig.py
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 | |
TransformationStatus
¶
Bases: BaseModel
Return from transformation status.
Source code in oteapi/models/transformationconfig.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
datacacheconfig
¶
Pydantic DataCache Configuration Data Model.
DataCacheConfig
¶
Bases: AttrDict
DataCache Configuration.
This class should not be used directly as a configuration object for a strategy object, but only as a configuration field inside a configuration object.
Source code in oteapi/models/datacacheconfig.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
filterconfig
¶
Pydantic Filter Configuration Data Model.
FilterConfig
¶
Bases: GenericConfig
Filter Strategy Data Configuration.
Source code in oteapi/models/filterconfig.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
functionconfig
¶
Pydantic Function Configuration Data Model.
FunctionConfig
¶
Bases: GenericConfig
Function Strategy Data Configuration.
Source code in oteapi/models/functionconfig.py
7 8 9 10 11 12 13 | |
genericconfig
¶
Generic data model for configuration attributes.
AttrDict
¶
Bases: BaseModel, Mapping
An object whose attributes can also be accessed through subscription, like with a dictionary.
Source code in oteapi/models/genericconfig.py
10 11 12 13 14 15 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 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 | |
Config
¶
Class for configuration of pydantic models.
Source code in oteapi/models/genericconfig.py
14 15 16 17 | |
__contains__(self, name)
¶
Enable using the 'in' operator on this object.
Source code in oteapi/models/genericconfig.py
19 20 21 | |
__delitem__(self, key)
¶
Enable deletion access through subscription.
Source code in oteapi/models/genericconfig.py
23 24 25 26 27 28 29 30 31 | |
__getitem__(self, key)
¶
Enable read access through subscription.
Source code in oteapi/models/genericconfig.py
33 34 35 36 37 | |
__iter__(self)
¶
Enable **unpacking.
Source code in oteapi/models/genericconfig.py
57 58 59 | |
__len__(self)
¶
Return number of items.
Source code in oteapi/models/genericconfig.py
53 54 55 | |
__setattr__(self, name, value)
¶
Extend BaseModel.setattr with type-checking.
Source code in oteapi/models/genericconfig.py
39 40 41 42 43 44 45 46 47 | |
__setitem__(self, key, value)
¶
Enable write access through subscription.
Source code in oteapi/models/genericconfig.py
49 50 51 | |
get(self, key, default=None)
¶
Mapping get-method.
Source code in oteapi/models/genericconfig.py
73 74 75 | |
items(self)
¶
Return a view of all (key, value) pairs.
Source code in oteapi/models/genericconfig.py
61 62 63 | |
keys(self)
¶
Return a view of all keys.
Source code in oteapi/models/genericconfig.py
65 66 67 | |
update(self, other=None, **kwargs)
¶
MutableMapping update-method.
Source code in oteapi/models/genericconfig.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
values(self)
¶
Return a view of all values.
Source code in oteapi/models/genericconfig.py
69 70 71 | |
GenericConfig
¶
Bases: BaseModel
Generic class for configuration objects.
Source code in oteapi/models/genericconfig.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
__init_subclass__(cls)
¶
Initialize subclass descriptions with their docstrings.
Source code in oteapi/models/genericconfig.py
116 117 118 119 | |
mappingconfig
¶
Pydantic Mapping Configuration Data Model.
MappingConfig
¶
Bases: GenericConfig
Mapping Strategy Data Configuration.
Source code in oteapi/models/mappingconfig.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
resourceconfig
¶
Pydantic Resource Configuration Data Model.
HostlessAnyUrl
¶
Bases: AnyUrl
AnyUrl, but allow not having a host.
Source code in oteapi/models/resourceconfig.py
9 10 11 12 | |
ResourceConfig
¶
Bases: GenericConfig
Important
Either of the pairs of attributes downloadUrl/mediaType or
accessUrl/accessService MUST be specified.
Resource Strategy Data Configuration.
Source code in oteapi/models/resourceconfig.py
15 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 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 | |
ensure_unique_url_pairs(cls, values)
¶
Ensure either downloadUrl/mediaType or accessUrl/accessService are defined. It's fine to define them all, but at least one complete pair MUST be specified.
Source code in oteapi/models/resourceconfig.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
sessionupdate
¶
transformationconfig
¶
Pydantic Transformation Configuration Data Model.
A transformation status data model is provided as well.
This data model represents what should be returned from the strategy's status()
method.
PriorityEnum
¶
Bases: str, Enum
Defining process priority enumerators.
Process priorities:
- Low
- Medium
- High
Source code in oteapi/models/transformationconfig.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
TransformationConfig
¶
Bases: GenericConfig
Transformation Strategy Data Configuration.
Source code in oteapi/models/transformationconfig.py
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 | |
TransformationStatus
¶
Bases: BaseModel
Return from transformation status.
Source code in oteapi/models/transformationconfig.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |