wizata-dsapi 2.0.0.dev1__tar.gz → 2.0.0.dev2__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-2.0.0.dev1/wizata_dsapi.egg-info → wizata_dsapi-2.0.0.dev2}/PKG-INFO +1 -1
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/__init__.py +2 -1
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/api_config.py +7 -0
- wizata_dsapi-2.0.0.dev2/wizata_dsapi/edge_device.py +119 -0
- wizata_dsapi-2.0.0.dev2/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2/wizata_dsapi.egg-info}/PKG-INFO +1 -1
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi.egg-info/SOURCES.txt +1 -0
- wizata_dsapi-2.0.0.dev1/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/LICENSE.txt +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/README.rst +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/setup.cfg +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/setup.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -50,4 +50,5 @@ from .streamlit_utils import (get_streamlit_token, get_streamlit_domain, get_str
|
|
|
50
50
|
get_streamlit_twin_id)
|
|
51
51
|
|
|
52
52
|
from .search import FilterOperator, SearchQuery, SortOption, GroupSearchQuery
|
|
53
|
-
from .notification import NotificationScope, DeviceToken, AlertRule, AlertActive
|
|
53
|
+
from .notification import NotificationScope, DeviceToken, AlertRule, AlertActive
|
|
54
|
+
from .edge_device import EdgeDevice, EdgeDeviceStatus, EdgeDeviceType
|
|
@@ -18,6 +18,7 @@ from .twin import Twin, TwinType
|
|
|
18
18
|
from .pipeline import Pipeline
|
|
19
19
|
from .pipeline_image import PipelineImage
|
|
20
20
|
from .insight import Insight
|
|
21
|
+
from .edge_device import EdgeDevice
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
# init APIs supported operations
|
|
@@ -153,5 +154,11 @@ _registry = {
|
|
|
153
154
|
"class": TwinType,
|
|
154
155
|
"cloud_dsapi": [ 'get_by_id', 'create', 'update', 'delete'],
|
|
155
156
|
"cloud_context": [ 'get_by_id', 'create', 'update', 'delete' ]
|
|
157
|
+
},
|
|
158
|
+
"edgedevices":
|
|
159
|
+
{
|
|
160
|
+
"class": EdgeDevice,
|
|
161
|
+
"cloud_dsapi": ['lists', 'get_by_id', 'get_by_key'],
|
|
162
|
+
"cloud_context": []
|
|
156
163
|
}
|
|
157
164
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import uuid
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from .api_dto import ApiDto
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class EdgeDeviceStatus(Enum):
|
|
7
|
+
"""
|
|
8
|
+
Status of an edge device.
|
|
9
|
+
"""
|
|
10
|
+
WAITING_FOR_REGISTRATION = "WaitingForRegistration"
|
|
11
|
+
REGISTERED = "Registered"
|
|
12
|
+
DEPLOYED = "Deployed"
|
|
13
|
+
FAILED = "Failed"
|
|
14
|
+
OFFLINE = "Offline"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class EdgeDeviceType(Enum):
|
|
18
|
+
"""
|
|
19
|
+
Type of an edge device.
|
|
20
|
+
"""
|
|
21
|
+
CONNECTIVITY = "Connectivity"
|
|
22
|
+
CONNECTIVITY_AND_PIPELINES = "ConnectivityAndPipelines"
|
|
23
|
+
CUSTOM = "Custom"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class EdgeDevice(ApiDto):
|
|
27
|
+
"""
|
|
28
|
+
Edge device registered on the platform.
|
|
29
|
+
|
|
30
|
+
:ivar uuid.UUID edge_device_id: technical id of the edge device.
|
|
31
|
+
:ivar str device_id: logical device identifier string.
|
|
32
|
+
:ivar str name: display name of the edge device.
|
|
33
|
+
:ivar str twin_name: name of the associated twin.
|
|
34
|
+
:ivar uuid.UUID twin_id: technical id of the associated twin.
|
|
35
|
+
:ivar EdgeDeviceStatus status: current status of the device.
|
|
36
|
+
:ivar int status_code: numeric status code.
|
|
37
|
+
:ivar EdgeDeviceType device_type: type of the edge device.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def route(cls):
|
|
42
|
+
return "edgedevices"
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_dict(cls, data):
|
|
46
|
+
obj = EdgeDevice()
|
|
47
|
+
obj.from_json(data)
|
|
48
|
+
return obj
|
|
49
|
+
|
|
50
|
+
def __init__(self,
|
|
51
|
+
edge_device_id: uuid.UUID = None,
|
|
52
|
+
device_id: str = None,
|
|
53
|
+
name: str = None,
|
|
54
|
+
twin_name: str = None,
|
|
55
|
+
twin_id: uuid.UUID = None,
|
|
56
|
+
status: EdgeDeviceStatus = None,
|
|
57
|
+
status_code: int = None,
|
|
58
|
+
device_type: EdgeDeviceType = None):
|
|
59
|
+
if edge_device_id is None:
|
|
60
|
+
self.edge_device_id = uuid.uuid4()
|
|
61
|
+
else:
|
|
62
|
+
self.edge_device_id = edge_device_id
|
|
63
|
+
self.device_id = device_id
|
|
64
|
+
self.name = name
|
|
65
|
+
self.twin_name = twin_name
|
|
66
|
+
self.twin_id = twin_id
|
|
67
|
+
self.status = status
|
|
68
|
+
self.status_code = status_code
|
|
69
|
+
self.device_type = device_type
|
|
70
|
+
|
|
71
|
+
def api_id(self) -> str:
|
|
72
|
+
return str(self.edge_device_id).upper()
|
|
73
|
+
|
|
74
|
+
def api_key(self) -> str:
|
|
75
|
+
return self.device_id
|
|
76
|
+
|
|
77
|
+
def set_id(self, id_value):
|
|
78
|
+
self.edge_device_id = uuid.UUID(str(id_value))
|
|
79
|
+
|
|
80
|
+
def endpoint(self) -> str:
|
|
81
|
+
return "EdgeDevices"
|
|
82
|
+
|
|
83
|
+
def from_json(self, obj):
|
|
84
|
+
if "id" in obj and obj["id"] is not None:
|
|
85
|
+
self.edge_device_id = uuid.UUID(obj["id"])
|
|
86
|
+
if "deviceId" in obj and obj["deviceId"] is not None:
|
|
87
|
+
self.device_id = obj["deviceId"]
|
|
88
|
+
if "name" in obj and obj["name"] is not None:
|
|
89
|
+
self.name = obj["name"]
|
|
90
|
+
if "twinName" in obj and obj["twinName"] is not None:
|
|
91
|
+
self.twin_name = obj["twinName"]
|
|
92
|
+
if "twinId" in obj and obj["twinId"] is not None:
|
|
93
|
+
self.twin_id = uuid.UUID(obj["twinId"])
|
|
94
|
+
if "status" in obj and obj["status"] is not None:
|
|
95
|
+
self.status = EdgeDeviceStatus(obj["status"])
|
|
96
|
+
if "statusCode" in obj and obj["statusCode"] is not None:
|
|
97
|
+
self.status_code = int(obj["statusCode"])
|
|
98
|
+
if "deviceType" in obj and obj["deviceType"] is not None:
|
|
99
|
+
self.device_type = EdgeDeviceType(obj["deviceType"])
|
|
100
|
+
|
|
101
|
+
def to_json(self, target: str = None):
|
|
102
|
+
obj = {
|
|
103
|
+
"id": str(self.edge_device_id)
|
|
104
|
+
}
|
|
105
|
+
if self.device_id is not None:
|
|
106
|
+
obj["deviceId"] = self.device_id
|
|
107
|
+
if self.name is not None:
|
|
108
|
+
obj["name"] = self.name
|
|
109
|
+
if self.twin_name is not None:
|
|
110
|
+
obj["twinName"] = self.twin_name
|
|
111
|
+
if self.twin_id is not None:
|
|
112
|
+
obj["twinId"] = str(self.twin_id)
|
|
113
|
+
if self.status is not None:
|
|
114
|
+
obj["status"] = self.status.value
|
|
115
|
+
if self.status_code is not None:
|
|
116
|
+
obj["statusCode"] = self.status_code
|
|
117
|
+
if self.device_type is not None:
|
|
118
|
+
obj["deviceType"] = self.device_type.value
|
|
119
|
+
return obj
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.0.dev2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.0.dev1"
|
|
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
|
{wizata_dsapi-2.0.0.dev1 → wizata_dsapi-2.0.0.dev2}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|