wizata-dsapi 2.2.0.dev12__tar.gz → 2.2.0.dev14__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 (71) hide show
  1. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/PKG-INFO +1 -1
  2. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/request.py +3 -2
  3. wizata_dsapi-2.2.0.dev14/wizata_dsapi/version.py +1 -0
  4. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/wizata_dsapi_client.py +38 -0
  5. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi.egg-info/PKG-INFO +1 -1
  6. wizata_dsapi-2.2.0.dev12/wizata_dsapi/version.py +0 -1
  7. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/LICENSE.txt +0 -0
  8. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/README.rst +0 -0
  9. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/setup.cfg +0 -0
  10. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/setup.py +0 -0
  11. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/__init__.py +0 -0
  12. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/api_config.py +0 -0
  13. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/api_dto.py +0 -0
  14. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/api_interface.py +0 -0
  15. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/bucket.py +0 -0
  16. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/business_label.py +0 -0
  17. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/connection.py +0 -0
  18. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/connection_types.py +0 -0
  19. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/context.py +0 -0
  20. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/dashboard.py +0 -0
  21. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/dataframe_toolkit.py +0 -0
  22. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/datapoint.py +0 -0
  23. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/datastore.py +0 -0
  24. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/deployment.py +0 -0
  25. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/ds_dataframe.py +0 -0
  26. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  27. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/edge_config.py +0 -0
  28. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/edge_device.py +0 -0
  29. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/edge_module.py +0 -0
  30. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/evaluation.py +0 -0
  31. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/execution.py +0 -0
  32. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/execution_log.py +0 -0
  33. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/experiment.py +0 -0
  34. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/graylog_log.py +0 -0
  35. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/group_system.py +0 -0
  36. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/ilogger.py +0 -0
  37. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/insight.py +0 -0
  38. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/inventory.py +0 -0
  39. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/mlmodel.py +0 -0
  40. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/mobile_asset.py +0 -0
  41. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/model_toolkit.py +0 -0
  42. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/models/__init__.py +0 -0
  43. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/models/common.py +0 -0
  44. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/notification.py +0 -0
  45. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/paged_query_result.py +0 -0
  46. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/pipeline.py +0 -0
  47. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/pipeline_image.py +0 -0
  48. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/plot.py +0 -0
  49. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/plots/__init__.py +0 -0
  50. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/plots/common.py +0 -0
  51. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/plots/theme.py +0 -0
  52. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/product.py +0 -0
  53. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/script.py +0 -0
  54. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/scripts/__init__.py +0 -0
  55. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/scripts/common.py +0 -0
  56. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/search.py +0 -0
  57. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/solution_component.py +0 -0
  58. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/streamlit_utils.py +0 -0
  59. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/template.py +0 -0
  60. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/template_config.py +0 -0
  61. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/trigger.py +0 -0
  62. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/twin.py +0 -0
  63. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/twinregistration.py +0 -0
  64. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/user.py +0 -0
  65. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/wizard_function.py +0 -0
  66. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/wizard_request.py +0 -0
  67. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi/words.py +0 -0
  68. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  69. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  70. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi.egg-info/requires.txt +0 -0
  71. {wizata_dsapi-2.2.0.dev12 → wizata_dsapi-2.2.0.dev14}/wizata_dsapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.2.0.dev12
3
+ Version: 2.2.0.dev14
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -685,8 +685,9 @@ class Request(ApiDto):
685
685
  if "template" in json_data.keys():
686
686
  self.template = json_data["template"]
687
687
 
688
- if len(datapoints) == 0 and self.template is None:
689
- 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')
690
691
 
691
692
  if len(datapoints) >= 0:
692
693
  self.datapoints = datapoints
@@ -0,0 +1 @@
1
+ __version__ = "2.2.0.dev14"
@@ -56,6 +56,7 @@ import ast
56
56
  from .deployment import Deployment, DeploymentStatus
57
57
  from .product import ProductKind, Product, ProductComponent
58
58
  from .inventory import InventoryBalance, InventoryStorage, InventoryStock
59
+ from .connection import EdgeDeviceKey
59
60
  from .api_config import _registry
60
61
 
61
62
  from .streamlit_utils import get_streamlit_token, get_streamlit_domain
@@ -2989,6 +2990,43 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
2989
2990
  self._planner_request("DELETE", f"planner/inventory/balances/{self._balance_id(balance)}/",
2990
2991
  expected=(204,))
2991
2992
 
2993
+ # ------------------------------------------------------------ edge device keys
2994
+
2995
+ @staticmethod
2996
+ def _edge_device_keys_route(edge_device_id) -> str:
2997
+ if not edge_device_id:
2998
+ raise ValueError("please provide the edge device id")
2999
+ return f"edgedevices/{urllib.parse.quote(str(edge_device_id), safe='')}/keys"
3000
+
3001
+ def register_edge_device_key(self, edge_device_id: str, public_key: str) -> EdgeDeviceKey:
3002
+ """
3003
+ Register the public half of the key pair an edge generated for itself (DEV-6013).
3004
+ Connection secrets are sealed for the edge's active key, and only that edge can
3005
+ open them: the private half never leaves the device.
3006
+
3007
+ Registering the same key again is a no-op, so an edge can register on every start.
3008
+ A different key retires the current one, and every secret sealed for that one must
3009
+ be entered again.
3010
+
3011
+ :param edge_device_id: the device id the edge runs as, not its UUID.
3012
+ :param public_key: PEM of the edge's X25519 public key.
3013
+ :return: the edge's active key.
3014
+ """
3015
+ response = self._process_request(method="POST",
3016
+ route=self._edge_device_keys_route(edge_device_id),
3017
+ data=json.dumps({"publicKey": public_key}))
3018
+ return EdgeDeviceKey.from_dict(response.json())
3019
+
3020
+ def get_edge_device_keys(self, edge_device_id: str) -> list:
3021
+ """
3022
+ :param edge_device_id: the device id the edge runs as, not its UUID.
3023
+ :return: every EdgeDeviceKey the edge registered, newest first. With no active
3024
+ one, the edge has not registered yet and no secret can be entered for it.
3025
+ """
3026
+ return self._process_request(method="GET",
3027
+ route=self._edge_device_keys_route(edge_device_id),
3028
+ dto_class=EdgeDeviceKey, result_type="list")
3029
+
2992
3030
 
2993
3031
  def api() -> WizataDSAPIClient:
2994
3032
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.2.0.dev12
3
+ Version: 2.2.0.dev14
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -1 +0,0 @@
1
- __version__ = "2.2.0.dev12"