wizata-dsapi 2.0.0.dev14__tar.gz → 2.0.0.dev15__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 (65) hide show
  1. {wizata_dsapi-2.0.0.dev14/wizata_dsapi.egg-info → wizata_dsapi-2.0.0.dev15}/PKG-INFO +1 -1
  2. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/__init__.py +1 -0
  3. wizata_dsapi-2.0.0.dev15/wizata_dsapi/template_config.py +86 -0
  4. wizata_dsapi-2.0.0.dev15/wizata_dsapi/version.py +1 -0
  5. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15/wizata_dsapi.egg-info}/PKG-INFO +1 -1
  6. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/SOURCES.txt +1 -0
  7. wizata_dsapi-2.0.0.dev14/wizata_dsapi/version.py +0 -1
  8. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/LICENSE.txt +0 -0
  9. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/README.rst +0 -0
  10. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/setup.cfg +0 -0
  11. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/setup.py +0 -0
  12. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/api_config.py +0 -0
  13. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/api_dto.py +0 -0
  14. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/api_interface.py +0 -0
  15. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/bucket.py +0 -0
  16. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/business_label.py +0 -0
  17. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/context.py +0 -0
  18. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/dashboard.py +0 -0
  19. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/dataframe_toolkit.py +0 -0
  20. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/datapoint.py +0 -0
  21. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/datastore.py +0 -0
  22. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/ds_dataframe.py +0 -0
  23. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  24. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/edge_config.py +0 -0
  25. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/edge_device.py +0 -0
  26. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/edge_module.py +0 -0
  27. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/evaluation.py +0 -0
  28. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/execution.py +0 -0
  29. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/execution_log.py +0 -0
  30. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/experiment.py +0 -0
  31. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/graylog_log.py +0 -0
  32. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/group_system.py +0 -0
  33. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/ilogger.py +0 -0
  34. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/insight.py +0 -0
  35. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/mlmodel.py +0 -0
  36. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/mobile_asset.py +0 -0
  37. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/model_toolkit.py +0 -0
  38. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/models/__init__.py +0 -0
  39. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/models/common.py +0 -0
  40. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/notification.py +0 -0
  41. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/paged_query_result.py +0 -0
  42. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/pipeline.py +0 -0
  43. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/pipeline_image.py +0 -0
  44. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/plot.py +0 -0
  45. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/plots/__init__.py +0 -0
  46. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/plots/common.py +0 -0
  47. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/request.py +0 -0
  48. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/script.py +0 -0
  49. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/scripts/__init__.py +0 -0
  50. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/scripts/common.py +0 -0
  51. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/search.py +0 -0
  52. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/solution_component.py +0 -0
  53. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/streamlit_utils.py +0 -0
  54. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/template.py +0 -0
  55. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/trigger.py +0 -0
  56. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/twin.py +0 -0
  57. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/twinregistration.py +0 -0
  58. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/user.py +0 -0
  59. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/wizard_function.py +0 -0
  60. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/wizard_request.py +0 -0
  61. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  62. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/words.py +0 -0
  63. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  64. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/requires.txt +0 -0
  65. {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/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.0.0.dev14
3
+ Version: 2.0.0.dev15
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -57,4 +57,5 @@ from .edge_config import EdgeConsumer, EdgeWriter, EdgeTrigger
57
57
  from .dashboard import Dashboard, DashboardType
58
58
  from .mobile_asset import MobileAssetTile, MobileAssetTileType, MobileAssetConfig
59
59
  from .graylog_log import GraylogLog
60
+ from .template_config import TemplateConfig
60
61
  from .user import User, UserType
@@ -0,0 +1,86 @@
1
+ """
2
+ TemplateConfig DTO for template configuration persistence.
3
+
4
+ Stores structured metadata linking template properties together
5
+ for models, recommendations/automation, and KPIs.
6
+
7
+ One row per template. PK is templateKey (string, matches Template.key).
8
+ """
9
+
10
+ from datetime import datetime, timezone
11
+ from typing import Optional
12
+
13
+
14
+ class TemplateConfig:
15
+ """
16
+ TemplateConfig entity stored in PostgreSQL ``"TemplateConfig"`` table.
17
+
18
+ PK is ``template_key`` (string, matches Template.key).
19
+
20
+ - ``models``: list of model definitions (modelKey + activationProperty).
21
+ - ``recommendations``: list of recommendation groups linking related properties.
22
+ - ``kpis``: list of KPI definitions with operator-based evaluation.
23
+ """
24
+
25
+ def __init__(self):
26
+ self.template_key: Optional[str] = None
27
+ self.models: list = []
28
+ self.recommendations: list = []
29
+ self.kpis: list = []
30
+ self.created_at: Optional[datetime] = None
31
+ self.updated_at: Optional[datetime] = None
32
+
33
+ # ------------------------------------------------------------------
34
+ # Serialisation
35
+ # ------------------------------------------------------------------
36
+
37
+ def to_dict(self) -> dict:
38
+ obj = {}
39
+ if self.template_key is not None:
40
+ obj["templateKey"] = self.template_key
41
+ obj["models"] = list(self.models)
42
+ obj["recommendations"] = list(self.recommendations)
43
+ obj["kpis"] = list(self.kpis)
44
+ if self.created_at is not None:
45
+ obj["createdAt"] = int(self.created_at.timestamp() * 1000)
46
+ if self.updated_at is not None:
47
+ obj["updatedAt"] = int(self.updated_at.timestamp() * 1000)
48
+ return obj
49
+
50
+ @classmethod
51
+ def from_dict(cls, data: dict) -> "TemplateConfig":
52
+ obj = cls()
53
+ obj.template_key = data.get("templateKey") or data.get("template_key")
54
+ obj.models = data.get("models") or []
55
+ obj.recommendations = data.get("recommendations") or []
56
+ obj.kpis = data.get("kpis") or []
57
+
58
+ created_raw = data.get("createdAt") or data.get("created_at")
59
+ if created_raw is not None:
60
+ obj.created_at = datetime.fromtimestamp(created_raw / 1000, tz=timezone.utc)
61
+
62
+ updated_raw = data.get("updatedAt") or data.get("updated_at")
63
+ if updated_raw is not None:
64
+ obj.updated_at = datetime.fromtimestamp(updated_raw / 1000, tz=timezone.utc)
65
+ return obj
66
+
67
+ # ------------------------------------------------------------------
68
+ # API identity helpers
69
+ # ------------------------------------------------------------------
70
+
71
+ def api_id(self) -> str:
72
+ return self.template_key
73
+
74
+ def api_key(self) -> str:
75
+ return self.template_key
76
+
77
+ def set_id(self, value):
78
+ self.template_key = str(value)
79
+
80
+ def __repr__(self) -> str:
81
+ return (
82
+ f"TemplateConfig(template_key={self.template_key!r}, "
83
+ f"models={len(self.models)}, "
84
+ f"recommendations={len(self.recommendations)}, "
85
+ f"kpis={len(self.kpis)})"
86
+ )
@@ -0,0 +1 @@
1
+ __version__ = "2.0.0.dev15"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.0.0.dev14
3
+ Version: 2.0.0.dev15
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -39,6 +39,7 @@ wizata_dsapi/search.py
39
39
  wizata_dsapi/solution_component.py
40
40
  wizata_dsapi/streamlit_utils.py
41
41
  wizata_dsapi/template.py
42
+ wizata_dsapi/template_config.py
42
43
  wizata_dsapi/trigger.py
43
44
  wizata_dsapi/twin.py
44
45
  wizata_dsapi/twinregistration.py
@@ -1 +0,0 @@
1
- __version__ = "2.0.0.dev14"