wizata-dsapi 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/PKG-INFO +1 -1
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/__init__.py +1 -1
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/api_config.py +7 -1
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/twin.py +94 -0
- wizata_dsapi-1.2.7/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-1.2.6/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/LICENSE.txt +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/README.rst +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/setup.cfg +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/setup.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-1.2.6 → wizata_dsapi-1.2.7}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -18,7 +18,7 @@ from .group_system import GroupSystem
|
|
|
18
18
|
from .bucket import Bucket
|
|
19
19
|
|
|
20
20
|
# Sql Entities (Dto)
|
|
21
|
-
from .twin import Twin, TwinBlockType
|
|
21
|
+
from .twin import Twin, TwinBlockType, TwinType
|
|
22
22
|
from .datapoint import DataPoint, BusinessType, Label, Unit, Category, InputModeType
|
|
23
23
|
from .datastore import DataStore
|
|
24
24
|
from .insight import Insight
|
|
@@ -14,7 +14,7 @@ from .solution_component import SolutionComponent
|
|
|
14
14
|
from .business_label import BusinessLabel
|
|
15
15
|
from .twinregistration import TwinRegistration, TwinRegistrationProperty
|
|
16
16
|
from .trigger import Trigger
|
|
17
|
-
from .twin import Twin
|
|
17
|
+
from .twin import Twin, TwinType
|
|
18
18
|
from .pipeline import Pipeline
|
|
19
19
|
from .pipeline_image import PipelineImage
|
|
20
20
|
from .insight import Insight
|
|
@@ -147,5 +147,11 @@ _registry = {
|
|
|
147
147
|
"class": Twin,
|
|
148
148
|
"cloud_dsapi": ['lists', 'get_by_id', 'get_by_key', 'create', 'update', 'delete', 'search'],
|
|
149
149
|
"cloud_context": ['get_by_id', 'get_by_key', 'create', 'update', 'delete', 'search']
|
|
150
|
+
},
|
|
151
|
+
"twintypes":
|
|
152
|
+
{
|
|
153
|
+
"class": TwinType,
|
|
154
|
+
"cloud_dsapi": [ 'get_by_id', 'create', 'update', 'delete'],
|
|
155
|
+
"cloud_context": [ 'get_by_id', 'create', 'update', 'delete' ]
|
|
150
156
|
}
|
|
151
157
|
}
|
|
@@ -13,8 +13,96 @@ def is_valid_hex_color(color):
|
|
|
13
13
|
return True
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
class TwinType(ApiDto):
|
|
17
|
+
"""
|
|
18
|
+
twin type
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def route(cls):
|
|
23
|
+
return "twintypes"
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls, data):
|
|
27
|
+
obj = TwinType()
|
|
28
|
+
obj.from_json(data)
|
|
29
|
+
return obj
|
|
30
|
+
|
|
31
|
+
def __init__(self,
|
|
32
|
+
twin_type_id: uuid.UUID = None,
|
|
33
|
+
name: str = None,
|
|
34
|
+
icon: str = None,
|
|
35
|
+
color: str = None,
|
|
36
|
+
description: str = None):
|
|
37
|
+
if twin_type_id is None:
|
|
38
|
+
self.twin_type_id = uuid.uuid4()
|
|
39
|
+
else:
|
|
40
|
+
self.twin_type_id = twin_type_id
|
|
41
|
+
self.name = name
|
|
42
|
+
self.icon = icon
|
|
43
|
+
self.color = color
|
|
44
|
+
if color is not None:
|
|
45
|
+
is_valid_hex_color(color)
|
|
46
|
+
self.description = description
|
|
47
|
+
self.createdById = None
|
|
48
|
+
self.createdDate = None
|
|
49
|
+
self.updatedById = None
|
|
50
|
+
self.updatedDate = None
|
|
51
|
+
|
|
52
|
+
def api_id(self) -> str:
|
|
53
|
+
return str(self.twin_type_id).upper()
|
|
54
|
+
|
|
55
|
+
def endpoint(self) -> str:
|
|
56
|
+
return "TwinTypes"
|
|
57
|
+
|
|
58
|
+
def from_json(self, obj):
|
|
59
|
+
if "id" in obj.keys():
|
|
60
|
+
self.twin_type_id = uuid.UUID(obj["id"])
|
|
61
|
+
if "name" in obj.keys() and obj["name"] is not None:
|
|
62
|
+
self.name = obj["name"]
|
|
63
|
+
if "color" in obj.keys() and obj["color"] is not None:
|
|
64
|
+
is_valid_hex_color(str(obj["color"]))
|
|
65
|
+
self.color = str(obj["color"])
|
|
66
|
+
if "icon" in obj.keys() and obj["icon"] is not None:
|
|
67
|
+
self.icon = str(obj["icon"])
|
|
68
|
+
if "description" in obj.keys() and obj["description"] is not None:
|
|
69
|
+
self.description = str(obj["description"])
|
|
70
|
+
if "createdById" in obj.keys() and obj["createdById"] is not None:
|
|
71
|
+
self.createdById = obj["createdById"]
|
|
72
|
+
if "createdDate" in obj.keys() and obj["createdDate"] is not None:
|
|
73
|
+
self.createdDate = obj["createdDate"]
|
|
74
|
+
if "updatedById" in obj.keys() and obj["updatedById"] is not None:
|
|
75
|
+
self.updatedById = obj["updatedById"]
|
|
76
|
+
if "updatedDate" in obj.keys() and obj["updatedDate"] is not None:
|
|
77
|
+
self.updatedDate = obj["updatedDate"]
|
|
78
|
+
|
|
79
|
+
def to_json(self, target: str = None):
|
|
80
|
+
obj = {
|
|
81
|
+
"id": str(self.twin_type_id)
|
|
82
|
+
}
|
|
83
|
+
if self.name is not None:
|
|
84
|
+
obj["name"] = str(self.name)
|
|
85
|
+
if self.color is not None:
|
|
86
|
+
obj["color"] = str(self.color)
|
|
87
|
+
if self.description is not None:
|
|
88
|
+
obj["description"] = str(self.description)
|
|
89
|
+
if self.icon is not None:
|
|
90
|
+
obj["icon"] = str(self.icon)
|
|
91
|
+
if self.createdById is not None:
|
|
92
|
+
obj["createdById"] = str(self.createdById)
|
|
93
|
+
if self.createdDate is not None:
|
|
94
|
+
obj["createdDate"] = str(self.createdDate)
|
|
95
|
+
if self.updatedById is not None:
|
|
96
|
+
obj["updatedById"] = str(self.updatedById)
|
|
97
|
+
if self.updatedDate is not None:
|
|
98
|
+
obj["updatedDate"] = str(self.updatedDate)
|
|
99
|
+
return obj
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
16
103
|
class TwinBlockType(Enum):
|
|
17
104
|
"""
|
|
105
|
+
deprecated - replaced by TwinType
|
|
18
106
|
digital twin block type
|
|
19
107
|
- area
|
|
20
108
|
- machine
|
|
@@ -59,6 +147,7 @@ class Twin(ApiDto):
|
|
|
59
147
|
return obj
|
|
60
148
|
|
|
61
149
|
def __init__(self, twin_id=None, hardware_id=None, name=None, parent_id=None, ttype=TwinBlockType.MACHINE,
|
|
150
|
+
type_id:uuid.UUID = None,
|
|
62
151
|
latitude_id: uuid.UUID = None, longitude_id: uuid.UUID = None, color: str = None, icon: str = None,
|
|
63
152
|
latitude: float = None, longitude: float = None, description: str = None):
|
|
64
153
|
if twin_id is None:
|
|
@@ -69,6 +158,7 @@ class Twin(ApiDto):
|
|
|
69
158
|
self.name = name
|
|
70
159
|
self.parent_id = parent_id
|
|
71
160
|
self.type = ttype
|
|
161
|
+
self.type_id = type_id
|
|
72
162
|
self.description = description
|
|
73
163
|
self.latitude = latitude
|
|
74
164
|
self.longitude = longitude
|
|
@@ -98,6 +188,8 @@ class Twin(ApiDto):
|
|
|
98
188
|
self.name = obj["name"]
|
|
99
189
|
if "parentId" in obj.keys() and obj["parentId"] is not None:
|
|
100
190
|
self.parent_id = uuid.UUID(obj["parentId"])
|
|
191
|
+
if "twinTypeId" in obj.keys() and obj["twinTypeId"] is not None:
|
|
192
|
+
self.type_id = uuid.UUID(obj["twinTypeId"])
|
|
101
193
|
if "latitude" in obj.keys() and obj["latitude"] is not None:
|
|
102
194
|
self.latitude = float(obj["latitude"])
|
|
103
195
|
if "longitude" in obj.keys() and obj["longitude"] is not None:
|
|
@@ -134,6 +226,8 @@ class Twin(ApiDto):
|
|
|
134
226
|
obj["name"] = str(self.name)
|
|
135
227
|
if self.parent_id is not None:
|
|
136
228
|
obj["parentId"] = str(self.parent_id)
|
|
229
|
+
if self.type_id is not None:
|
|
230
|
+
obj["twinTypeId"] = str(self.type_id)
|
|
137
231
|
if self.type is not None and isinstance(self.type, TwinBlockType):
|
|
138
232
|
obj["type"] = self.type.value
|
|
139
233
|
if self.color is not None:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.7"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.2.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|