wizata-dsapi 1.1.46__tar.gz → 1.1.48__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.1.46 → wizata_dsapi-1.1.48}/PKG-INFO +1 -1
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/__init__.py +1 -1
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/datastore.py +1 -1
- wizata_dsapi-1.1.48/wizata_dsapi/streamlit_utils.py +48 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/twin.py +6 -1
- wizata_dsapi-1.1.48/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-1.1.46/wizata_dsapi/streamlit_utils.py +0 -17
- wizata_dsapi-1.1.46/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/LICENSE.txt +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/README.rst +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/setup.cfg +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/setup.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -45,4 +45,4 @@ from .pipeline_image import PipelineImage
|
|
|
45
45
|
from .evaluation import Evaluation
|
|
46
46
|
|
|
47
47
|
# Streamlit utils
|
|
48
|
-
from .streamlit_utils import get_streamlit_token, get_streamlit_domain
|
|
48
|
+
from .streamlit_utils import get_streamlit_token, get_streamlit_domain, get_streamlit_from, get_streamlit_to
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from .dataframe_toolkit import generate_epoch
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def get_streamlit_token():
|
|
6
|
+
if 'streamlit' in sys.modules:
|
|
7
|
+
st = sys.modules['streamlit']
|
|
8
|
+
if st.query_params is not None and "auth_token" in st.query_params:
|
|
9
|
+
auth_token = st.query_params["auth_token"]
|
|
10
|
+
return auth_token
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_streamlit_domain():
|
|
14
|
+
if 'streamlit' in sys.modules:
|
|
15
|
+
st = sys.modules['streamlit']
|
|
16
|
+
if st.query_params is not None and "dsapi" in st.query_params:
|
|
17
|
+
domain = st.query_params["dsapi"]
|
|
18
|
+
return domain
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def get_streamlit_from() -> int:
|
|
22
|
+
"""
|
|
23
|
+
timestamp representation of from parameter on UI (ms)
|
|
24
|
+
:return:
|
|
25
|
+
"""
|
|
26
|
+
if 'streamlit' in sys.modules:
|
|
27
|
+
st = sys.modules['streamlit']
|
|
28
|
+
if st.query_params is not None and "from" in st.query_params:
|
|
29
|
+
param = st.query_params["from"]
|
|
30
|
+
if 'now' in param:
|
|
31
|
+
return generate_epoch(param)
|
|
32
|
+
else:
|
|
33
|
+
return int(param)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def get_streamlit_to() -> int:
|
|
37
|
+
"""
|
|
38
|
+
timestamp representation of to parameter on UI (ms)
|
|
39
|
+
:return:
|
|
40
|
+
"""
|
|
41
|
+
if 'streamlit' in sys.modules:
|
|
42
|
+
st = sys.modules['streamlit']
|
|
43
|
+
if st.query_params is not None and "to" in st.query_params:
|
|
44
|
+
param = st.query_params["to"]
|
|
45
|
+
if 'now' in param:
|
|
46
|
+
return generate_epoch(param)
|
|
47
|
+
else:
|
|
48
|
+
return int(param)
|
|
@@ -60,7 +60,7 @@ class Twin(ApiDto):
|
|
|
60
60
|
|
|
61
61
|
def __init__(self, twin_id=None, hardware_id=None, name=None, parent_id=None, ttype=TwinBlockType.MACHINE,
|
|
62
62
|
latitude_id: uuid.UUID = None, longitude_id: uuid.UUID = None, color: str = None, icon: str = None,
|
|
63
|
-
latitude: float = None, longitude: float = None):
|
|
63
|
+
latitude: float = None, longitude: float = None, description: str = None):
|
|
64
64
|
if twin_id is None:
|
|
65
65
|
self.twin_id = uuid.uuid4()
|
|
66
66
|
else:
|
|
@@ -69,6 +69,7 @@ class Twin(ApiDto):
|
|
|
69
69
|
self.name = name
|
|
70
70
|
self.parent_id = parent_id
|
|
71
71
|
self.type = ttype
|
|
72
|
+
self.description = description
|
|
72
73
|
self.latitude = latitude
|
|
73
74
|
self.longitude = longitude
|
|
74
75
|
self.latitude_id = latitude_id
|
|
@@ -110,6 +111,8 @@ class Twin(ApiDto):
|
|
|
110
111
|
self.color = str(obj["color"])
|
|
111
112
|
if "icon" in obj.keys() and obj["icon"] is not None:
|
|
112
113
|
self.icon = str(obj["icon"])
|
|
114
|
+
if "description" in obj.keys() and obj["description"] is not None:
|
|
115
|
+
self.description = str(obj["description"])
|
|
113
116
|
if "type" in obj.keys():
|
|
114
117
|
self.type = TwinBlockType(str(obj["type"]))
|
|
115
118
|
if "createdById" in obj.keys() and obj["createdById"] is not None:
|
|
@@ -135,6 +138,8 @@ class Twin(ApiDto):
|
|
|
135
138
|
obj["type"] = self.type.value
|
|
136
139
|
if self.color is not None:
|
|
137
140
|
obj["color"] = str(self.color)
|
|
141
|
+
if self.description is not None:
|
|
142
|
+
obj["description"] = str(self.description)
|
|
138
143
|
if self.latitude is not None:
|
|
139
144
|
obj["latitude"] = float(self.latitude)
|
|
140
145
|
if self.longitude is not None:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.48"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def get_streamlit_token():
|
|
5
|
-
if 'streamlit' in sys.modules:
|
|
6
|
-
st = sys.modules['streamlit']
|
|
7
|
-
if st.query_params is not None and "auth_token" in st.query_params:
|
|
8
|
-
auth_token = st.query_params["auth_token"]
|
|
9
|
-
return auth_token
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_streamlit_domain():
|
|
13
|
-
if 'streamlit' in sys.modules:
|
|
14
|
-
st = sys.modules['streamlit']
|
|
15
|
-
if st.query_params is not None and "dsapi" in st.query_params:
|
|
16
|
-
domain = st.query_params["dsapi"]
|
|
17
|
-
return domain
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.46"
|
|
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
|