dp3.common.datatype ¶
AnyEidT
module-attribute
¶
Type alias for any of possible entity ID data types.
Note that the type is determined based on the loaded entity configuration and in most cases is only one of the options, based on what entity is being processed.
ReadOnly ¶
Bases: BaseModel
The ReadOnly data_type is used to avoid datapoint insertion for an attribute.
DataType ¶
Bases: RootModel
Data type container
Represents one of primitive data types:
- tag
- binary
- string
- int
- int64
- float
- ipv4
- ipv6
- mac
- time
- special
- json
or composite data type:
- link
- array
- set
- dict
- category
type_info
property
¶
String representation of the data type, immune to whitespace changes
mirror_as
property
¶
If mirror_link
, what is the name of the mirrored attribute
_determine_value_validator ¶
Determines value validator (inner data_type
).
Source code in dp3/common/datatype.py
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 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 212 213 214 215 216 217 218 219 220 221 222 223 |
|
determine_value_validator ¶
get_linked_entity ¶
Returns linked entity id. Raises ValueError if DataType is not a link.
link_has_data ¶
Whether link has data. Raises ValueError if DataType is not a link.