wizata-dsapi 2.2.0.dev11__py3-none-any.whl → 2.2.0.dev13__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
@@ -165,7 +165,9 @@ class Request(ApiDto):
165
165
  :ivar dict filters: filters to apply to the query pre-aggregation. nested dictionary using as first key=datapoint then value=another dictionary with key=operator (gt,lt,gte,lte,eq,neq) and value is the float value to compare too).
166
166
  :ivar dict options: dict representing query options.
167
167
  :ivar list scopes: scope filters for SCOPED datapoints.
168
- :ivar list products: product keys to keep on inventoryMovement datapoints (all when None).
168
+ :ivar list products: product keys to keep on inventoryMovement datapoints (all when None). With
169
+ no datapoints, it selects the inventoryMovement datapoints holding them (under the twin
170
+ when the request names one).
169
171
  """
170
172
 
171
173
  @classmethod
@@ -683,8 +685,9 @@ class Request(ApiDto):
683
685
  if "template" in json_data.keys():
684
686
  self.template = json_data["template"]
685
687
 
686
- if len(datapoints) == 0 and self.template is None:
687
- raise KeyError('at least one datapoint or template is required within a request')
688
+ # products alone select the inventory datapoints holding them (DEV-6089)
689
+ if len(datapoints) == 0 and self.template is None and not json_data.get("products"):
690
+ raise KeyError('at least one datapoint, template or product is required within a request')
688
691
 
689
692
  if len(datapoints) >= 0:
690
693
  self.datapoints = datapoints
wizata_dsapi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.2.0.dev11"
1
+ __version__ = "2.2.0.dev13"
@@ -872,6 +872,8 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
872
872
  :param scopes: list of scope filters for SCOPED datapoints (e.g. ["normal", {"vibration": {"gte": 0.6}}]).
873
873
  :param products: product keys to keep on inventoryMovement datapoints (all when None).
874
874
  ``options={"inventory": "movements" | "balances" | "stock"}`` chooses what they return.
875
+ With no ``datapoints``, the inventoryMovement datapoints holding those products are
876
+ selected for you: every storage, or those under ``twin`` and its children (DEV-6089).
875
877
  :return: dataframe
876
878
  """
877
879
  return self._query(request=self._build_request(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.2.0.dev11
3
+ Version: 2.2.0.dev13
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -35,7 +35,7 @@ wizata_dsapi/pipeline.py,sha256=mMkNzFQsC9s1ZuC0HrfLG1BsZCnYYlrrhPlo6Out1Zs,4087
35
35
  wizata_dsapi/pipeline_image.py,sha256=WtMY0_ncba9WzZ96KQINiYshJegQdArzhspKTGWBgVA,7758
36
36
  wizata_dsapi/plot.py,sha256=KLeYj6xpG_XFSDuR4A8Iqp2fmAVLeDsHaUOVT2sRUYM,4033
37
37
  wizata_dsapi/product.py,sha256=EiiT9icS2xr8aN3STre4X7CsaJ33tt7jmOnQPD9pA6U,8139
38
- wizata_dsapi/request.py,sha256=sjYNjxI6m88hdPIPOkRfwoFLNaV7cupjnLIktalapNI,29298
38
+ wizata_dsapi/request.py,sha256=3gpnUMQJomndu5mTCatczmJ1sCs9sDlRKeeycj9bAYE,29560
39
39
  wizata_dsapi/script.py,sha256=1Mjw3BNxN_R5dx0f55T0WuebqqRr_69rsK5yuQZOjmQ,19467
40
40
  wizata_dsapi/search.py,sha256=pHX-xGIB0E6gJkTxXmLjFe_b8-0gei7hfkW0JnxzCl0,4691
41
41
  wizata_dsapi/solution_component.py,sha256=8gbZWx2h_xUqI_pAXa3goqAnR5Y-GDMii8MeGlaK1IE,9531
@@ -46,10 +46,10 @@ wizata_dsapi/trigger.py,sha256=waOX2AhrLvFzNFRQ535j6iemgg_QJP2QsWGL2ipljFg,8848
46
46
  wizata_dsapi/twin.py,sha256=8AnrxSaL7dMrILXJ3-GGmmUz078j3qqwzDTe6i86xqA,12672
47
47
  wizata_dsapi/twinregistration.py,sha256=iXt55AVGAQNl0jmxa3ZVynPqlSsIunFf4sLfp-MWTw0,13244
48
48
  wizata_dsapi/user.py,sha256=-hchKAMZULu9P00RUHDqu_5AT4NI5BYOJd8XCBrt3eQ,1950
49
- wizata_dsapi/version.py,sha256=TCQ6EuxkZkSAF9z2OreOaoGUIml8M_cNTiATBZV2h_U,28
49
+ wizata_dsapi/version.py,sha256=uhmzU8MoDAlfpvkR4vb9zjAKDSkdJwpXf9LeIyybKD4,28
50
50
  wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
51
51
  wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
52
- wizata_dsapi/wizata_dsapi_client.py,sha256=RH3EOCzWgwi9-gWrcsB7_hlLb0ZnpGE7Fl3nms50KI4,125021
52
+ wizata_dsapi/wizata_dsapi_client.py,sha256=VIZO7uOFYQmD4p7u6NvNBR8E7HLGbk9gM5Ut5jc5new,125215
53
53
  wizata_dsapi/words.py,sha256=tV8CqzCqODZCV7PgBxBF5exBxeF_ya9t5DiUy-cg6Sg,1535
54
54
  wizata_dsapi/models/__init__.py,sha256=O3Tusyhl8hFb-5QaEBY7DJISRB8Gf_Xbxxr-aFDR1_U,380
55
55
  wizata_dsapi/models/common.py,sha256=5BC3Dc6kMvqPGxHgoCuGVOynu_F1MWh7EJSzXIICSSg,27196
@@ -58,8 +58,8 @@ wizata_dsapi/plots/common.py,sha256=7F4WMBaddubnCpdSafgaI9U9Sz0Sngg0VREP_vnIMno,
58
58
  wizata_dsapi/plots/theme.py,sha256=D4sSgEwabXVxF3z1GV8DivXJbbY61KgxXAWfjUbNDAc,3594
59
59
  wizata_dsapi/scripts/__init__.py,sha256=9fRdTMuuXcqMkIsUPf5dwFsTWwBzKteQdAMVkyy2acQ,212
60
60
  wizata_dsapi/scripts/common.py,sha256=T2cP8aGPg8OgIvBWuQBNonVtph_dHlNFubByuYrLb0o,15675
61
- wizata_dsapi-2.2.0.dev11.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
62
- wizata_dsapi-2.2.0.dev11.dist-info/METADATA,sha256=W23IzCqA60_BsqAK8nIUiuFYtMNfoQts9-RjpZx4GtM,14038
63
- wizata_dsapi-2.2.0.dev11.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
64
- wizata_dsapi-2.2.0.dev11.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
65
- wizata_dsapi-2.2.0.dev11.dist-info/RECORD,,
61
+ wizata_dsapi-2.2.0.dev13.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
62
+ wizata_dsapi-2.2.0.dev13.dist-info/METADATA,sha256=8yFDks5topJ3JvC8l1oxlgfUFrJRWOJ7t6pQUmDYHAQ,14038
63
+ wizata_dsapi-2.2.0.dev13.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
64
+ wizata_dsapi-2.2.0.dev13.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
65
+ wizata_dsapi-2.2.0.dev13.dist-info/RECORD,,