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.
- {wizata_dsapi-2.0.0.dev14/wizata_dsapi.egg-info → wizata_dsapi-2.0.0.dev15}/PKG-INFO +1 -1
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/__init__.py +1 -0
- wizata_dsapi-2.0.0.dev15/wizata_dsapi/template_config.py +86 -0
- wizata_dsapi-2.0.0.dev15/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15/wizata_dsapi.egg-info}/PKG-INFO +1 -1
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/SOURCES.txt +1 -0
- wizata_dsapi-2.0.0.dev14/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/LICENSE.txt +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/README.rst +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/setup.cfg +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/setup.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/edge_device.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/wizata_dsapi_client.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -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 +0,0 @@
|
|
|
1
|
-
__version__ = "2.0.0.dev14"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wizata_dsapi-2.0.0.dev14 → wizata_dsapi-2.0.0.dev15}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|