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.
Files changed (55) hide show
  1. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/PKG-INFO +1 -1
  2. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/__init__.py +1 -1
  3. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/datastore.py +1 -1
  4. wizata_dsapi-1.1.48/wizata_dsapi/streamlit_utils.py +48 -0
  5. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/twin.py +6 -1
  6. wizata_dsapi-1.1.48/wizata_dsapi/version.py +1 -0
  7. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/PKG-INFO +1 -1
  8. wizata_dsapi-1.1.46/wizata_dsapi/streamlit_utils.py +0 -17
  9. wizata_dsapi-1.1.46/wizata_dsapi/version.py +0 -1
  10. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/LICENSE.txt +0 -0
  11. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/README.rst +0 -0
  12. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/setup.cfg +0 -0
  13. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/setup.py +0 -0
  14. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/api_config.py +0 -0
  15. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/api_dto.py +0 -0
  16. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/api_interface.py +0 -0
  17. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/bucket.py +0 -0
  18. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/business_label.py +0 -0
  19. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/context.py +0 -0
  20. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/dataframe_toolkit.py +0 -0
  21. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/datapoint.py +0 -0
  22. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/ds_dataframe.py +0 -0
  23. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  24. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/evaluation.py +0 -0
  25. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/execution.py +0 -0
  26. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/experiment.py +0 -0
  27. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/group_system.py +0 -0
  28. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/ilogger.py +0 -0
  29. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/insight.py +0 -0
  30. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/mlmodel.py +0 -0
  31. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/model_toolkit.py +0 -0
  32. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/models/__init__.py +0 -0
  33. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/models/common.py +0 -0
  34. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/paged_query_result.py +0 -0
  35. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/pipeline.py +0 -0
  36. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/pipeline_image.py +0 -0
  37. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/plot.py +0 -0
  38. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/plots/__init__.py +0 -0
  39. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/plots/common.py +0 -0
  40. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/request.py +0 -0
  41. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/script.py +0 -0
  42. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/scripts/__init__.py +0 -0
  43. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/scripts/common.py +0 -0
  44. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/solution_component.py +0 -0
  45. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/template.py +0 -0
  46. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/trigger.py +0 -0
  47. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/twinregistration.py +0 -0
  48. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/wizard_function.py +0 -0
  49. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/wizard_request.py +0 -0
  50. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  51. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi/words.py +0 -0
  52. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  53. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  54. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/requires.txt +0 -0
  55. {wizata_dsapi-1.1.46 → wizata_dsapi-1.1.48}/wizata_dsapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wizata_dsapi
3
- Version: 1.1.46
3
+ Version: 1.1.48
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -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
@@ -5,7 +5,7 @@ class DataStore(ApiDto):
5
5
 
6
6
  @classmethod
7
7
  def route(cls):
8
- return "datastore"
8
+ return "datastores"
9
9
 
10
10
  @classmethod
11
11
  def from_dict(cls, data):
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wizata-dsapi
3
- Version: 1.1.46
3
+ Version: 1.1.48
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -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