wizata-dsapi 1.2.13__py3-none-any.whl → 1.2.15__py3-none-any.whl

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/request.py CHANGED
@@ -23,8 +23,18 @@ class DynamicSelector:
23
23
  :ivar category: filter datapoints on uuid of a category or str name.
24
24
  """
25
25
 
26
- def __init__(self, category = None):
26
+ def __init__(self,
27
+ category = None,
28
+ unit = None,
29
+ twin_type = None,
30
+ agg_method = None,
31
+ rename = None):
27
32
  self.category = category
33
+ self.unit = unit
34
+ self.twin_type = twin_type
35
+ self.agg_method = agg_method
36
+ self.rename = rename
37
+ self.datapoints = []
28
38
 
29
39
  @classmethod
30
40
  def from_dict(cls, obj):
@@ -37,11 +47,31 @@ class DynamicSelector:
37
47
  raise TypeError('dynamic selector to parse is not a dict.')
38
48
  if "category" in obj:
39
49
  self.category = obj["category"]
50
+ if "unit" in obj:
51
+ self.unit = obj["unit"]
52
+ if "twin_type" in obj:
53
+ self.twin_type = obj["twin_type"]
54
+ if "datapoints" in obj:
55
+ self.datapoints = obj["datapoints"]
56
+ if "rename" in obj:
57
+ self.rename = obj["rename"]
58
+ if "agg_method" in obj:
59
+ self.agg_method = obj["agg_method"]
40
60
 
41
61
  def to_json(self) -> dict:
42
62
  obj = {}
43
63
  if self.category:
44
64
  obj["category"] = self.category
65
+ if self.unit:
66
+ obj["unit"] = self.unit
67
+ if self.twin_type:
68
+ obj["twin_type"] = self.twin_type
69
+ if self.datapoints:
70
+ obj["datapoints"] = self.datapoints
71
+ if self.agg_method:
72
+ obj["agg_method"] = self.agg_method
73
+ if self.rename:
74
+ obj["rename"] = self.rename
45
75
  return obj
46
76
 
47
77
  class RequestGroup:
wizata_dsapi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.2.13"
1
+ __version__ = "1.2.15"
@@ -611,7 +611,7 @@ class WizataDSAPIClient(ApiInterface):
611
611
  raise TypeError("Type not supported.")
612
612
 
613
613
  def query(self,
614
- datapoints: list[str] = None,
614
+ datapoints: list = None,
615
615
  start: datetime = None,
616
616
  end: datetime = None,
617
617
  interval: int = None,
@@ -662,7 +662,7 @@ class WizataDSAPIClient(ApiInterface):
662
662
 
663
663
  request.set_aggregation(agg_method, interval)
664
664
 
665
- if template is not None and twin is not None:
665
+ if template is not None or twin is not None:
666
666
  request.select_template(
667
667
  template_key=template,
668
668
  twin_hardware_id=twin
@@ -692,7 +692,7 @@ class WizataDSAPIClient(ApiInterface):
692
692
 
693
693
  def batch_query(self,
694
694
  step: timedelta,
695
- datapoints: list[str] = None,
695
+ datapoints: list = None,
696
696
  start: datetime = None,
697
697
  end: datetime = None,
698
698
  interval: int = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wizata-dsapi
3
- Version: 1.2.13
3
+ Version: 1.2.15
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -23,7 +23,7 @@ wizata_dsapi/pipeline.py,sha256=WDJeOxPZJiYW1qwTNZUm3jom2epIxqrSoiUwcrTF9EE,3130
23
23
  wizata_dsapi/pipeline_deployment.py,sha256=grekBaxUK0EhL9w7lDB8vNuW_wzLnHVm9Mq8Lkbkguk,1722
24
24
  wizata_dsapi/pipeline_image.py,sha256=M3FOr45dJIAEvsmXPpMD8JZ09k5-YpW9PRYEWJqptcI,5272
25
25
  wizata_dsapi/plot.py,sha256=SPGKFWWYNcRvHcqvvnPIIIBKsd5UwhdsxLW7b2dG2rs,2360
26
- wizata_dsapi/request.py,sha256=LtJAks3j6zc-GdKH2MnFo7pLjP2o8cDw8OKFlgOiLK0,25213
26
+ wizata_dsapi/request.py,sha256=y1QDcar5ZsTTP07SecucRSa4GCThBE1rxeKSv_yZMrQ,26232
27
27
  wizata_dsapi/script.py,sha256=DeEciwVpuCYZetgJCoivw_bYe8ma52WuTaTQ_VkLEcg,12930
28
28
  wizata_dsapi/solution_component.py,sha256=8gbZWx2h_xUqI_pAXa3goqAnR5Y-GDMii8MeGlaK1IE,9531
29
29
  wizata_dsapi/streamlit_utils.py,sha256=sXBdygktbixV828Zg01Nl27_a4F8zGFc4RY0C8g-1bc,1942
@@ -31,10 +31,10 @@ wizata_dsapi/template.py,sha256=h2f3dLduJ4WhreVxJXuFIB3pinnI3c39WxBms0bCgos,1300
31
31
  wizata_dsapi/trigger.py,sha256=w3BZYP-L3SUwvaT0oCTanh_Ewn57peZvlt7vxzHv9J8,5129
32
32
  wizata_dsapi/twin.py,sha256=_iYbbKw_m8flEzdnwGbA-NvSUiyQQDgCTa9vJeEggRg,10556
33
33
  wizata_dsapi/twinregistration.py,sha256=Mi6-YuwroiEXc0c1hgrOaphh4hNVoHupxOnXedVtJtE,13377
34
- wizata_dsapi/version.py,sha256=rQSlPcfj4yT4krIq6epTVQyBzIX4etVOgfupVkM-RnU,23
34
+ wizata_dsapi/version.py,sha256=Q6rDLuL8XHKQggYBtRCtxzpPQJgFYWn4x0gcVlH7H4g,23
35
35
  wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
36
36
  wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
37
- wizata_dsapi/wizata_dsapi_client.py,sha256=qVUwd_S_8NMXHygZpCxj2lP6wZSjxe-W9eOTOAqnzPg,78713
37
+ wizata_dsapi/wizata_dsapi_client.py,sha256=6URQeMA5A9eXxC2cs8TUbKolmOo-Kj6kII9NmRRITPQ,78702
38
38
  wizata_dsapi/words.py,sha256=tV8CqzCqODZCV7PgBxBF5exBxeF_ya9t5DiUy-cg6Sg,1535
39
39
  wizata_dsapi/models/__init__.py,sha256=O5PHqw8lKILw4apO-MfDxPz73wK0vADD9y3xjuzX7Tw,104
40
40
  wizata_dsapi/models/common.py,sha256=1dTqE80-mFJnUwEdNlJdhJzfZ2N5Kp8Nb3LQ8uwPtLc,3808
@@ -42,8 +42,8 @@ wizata_dsapi/plots/__init__.py,sha256=qgnSFqrjOPur-807M8uh5awIfjM1ZHXUXcAqHc-r2l
42
42
  wizata_dsapi/plots/common.py,sha256=jdPsJqLHBwSKc6dX83BSGPqSRxzIVNHSYO5yI_8sjGk,6568
43
43
  wizata_dsapi/scripts/__init__.py,sha256=hAxiETSQf0qOHde1si1tEAJU48seqEgHrchCzS2-LvQ,80
44
44
  wizata_dsapi/scripts/common.py,sha256=efwq-Rd0lvYljIs3gSFz9izogBD7asOU2cTK-IvHTkM,4244
45
- wizata_dsapi-1.2.13.dist-info/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
46
- wizata_dsapi-1.2.13.dist-info/METADATA,sha256=QF87VztxyHgKcwAOYsouLy-eZYtJareSe52FhI8ZZd4,2188
47
- wizata_dsapi-1.2.13.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
48
- wizata_dsapi-1.2.13.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
49
- wizata_dsapi-1.2.13.dist-info/RECORD,,
45
+ wizata_dsapi-1.2.15.dist-info/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
46
+ wizata_dsapi-1.2.15.dist-info/METADATA,sha256=SO2NHD7Aw7yy19uiS4QR9SeqYo3z1G06u2h5Gxabz9I,2188
47
+ wizata_dsapi-1.2.15.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
48
+ wizata_dsapi-1.2.15.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
49
+ wizata_dsapi-1.2.15.dist-info/RECORD,,