wizata-dsapi 2.0.0.dev10__tar.gz → 2.0.0.dev11__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 (64) hide show
  1. {wizata_dsapi-2.0.0.dev10/wizata_dsapi.egg-info → wizata_dsapi-2.0.0.dev11}/PKG-INFO +1 -1
  2. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/__init__.py +2 -1
  3. wizata_dsapi-2.0.0.dev11/wizata_dsapi/user.py +62 -0
  4. wizata_dsapi-2.0.0.dev11/wizata_dsapi/version.py +1 -0
  5. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11/wizata_dsapi.egg-info}/PKG-INFO +1 -1
  6. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi.egg-info/SOURCES.txt +1 -0
  7. wizata_dsapi-2.0.0.dev10/wizata_dsapi/version.py +0 -1
  8. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/LICENSE.txt +0 -0
  9. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/README.rst +0 -0
  10. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/setup.cfg +0 -0
  11. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/setup.py +0 -0
  12. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/api_config.py +0 -0
  13. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/api_dto.py +0 -0
  14. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/api_interface.py +0 -0
  15. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/bucket.py +0 -0
  16. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/business_label.py +0 -0
  17. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/context.py +0 -0
  18. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/dashboard.py +0 -0
  19. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/dataframe_toolkit.py +0 -0
  20. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/datapoint.py +0 -0
  21. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/datastore.py +0 -0
  22. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/ds_dataframe.py +0 -0
  23. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  24. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/edge_config.py +0 -0
  25. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/edge_device.py +0 -0
  26. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/edge_module.py +0 -0
  27. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/evaluation.py +0 -0
  28. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/execution.py +0 -0
  29. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/execution_log.py +0 -0
  30. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/experiment.py +0 -0
  31. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/graylog_log.py +0 -0
  32. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/group_system.py +0 -0
  33. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/ilogger.py +0 -0
  34. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/insight.py +0 -0
  35. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/mlmodel.py +0 -0
  36. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/mobile_asset.py +0 -0
  37. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/model_toolkit.py +0 -0
  38. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/models/__init__.py +0 -0
  39. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/models/common.py +0 -0
  40. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/notification.py +0 -0
  41. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/paged_query_result.py +0 -0
  42. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/pipeline.py +0 -0
  43. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/pipeline_image.py +0 -0
  44. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/plot.py +0 -0
  45. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/plots/__init__.py +0 -0
  46. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/plots/common.py +0 -0
  47. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/request.py +0 -0
  48. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/script.py +0 -0
  49. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/scripts/__init__.py +0 -0
  50. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/scripts/common.py +0 -0
  51. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/search.py +0 -0
  52. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/solution_component.py +0 -0
  53. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/streamlit_utils.py +0 -0
  54. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/template.py +0 -0
  55. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/trigger.py +0 -0
  56. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/twin.py +0 -0
  57. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/twinregistration.py +0 -0
  58. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/wizard_function.py +0 -0
  59. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/wizard_request.py +0 -0
  60. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/wizata_dsapi_client.py +0 -0
  61. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi/words.py +0 -0
  62. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  63. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/wizata_dsapi.egg-info/requires.txt +0 -0
  64. {wizata_dsapi-2.0.0.dev10 → wizata_dsapi-2.0.0.dev11}/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.dev10
3
+ Version: 2.0.0.dev11
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -56,4 +56,5 @@ from .edge_module import EdgeModule, EdgeModuleType, WIZATA_MODULES
56
56
  from .edge_config import EdgeConsumer, EdgeWriter, EdgeTrigger
57
57
  from .dashboard import Dashboard, DashboardType
58
58
  from .mobile_asset import MobileAssetTile, MobileAssetTileType, MobileAssetConfig
59
- from .graylog_log import GraylogLog
59
+ from .graylog_log import GraylogLog
60
+ from .user import User, UserType
@@ -0,0 +1,62 @@
1
+ import enum
2
+ import uuid
3
+
4
+
5
+ class UserType(enum.Enum):
6
+ USER = 0
7
+ API_KEY = 1
8
+
9
+
10
+ class User:
11
+
12
+ def __init__(self):
13
+ self.id: uuid.UUID | None = None
14
+ self.ad_id: uuid.UUID | None = None
15
+ self.first_name: str | None = None
16
+ self.last_name: str | None = None
17
+ self.email: str | None = None
18
+ self.phone: str | None = None
19
+ self.user_type: UserType | None = None
20
+
21
+ @classmethod
22
+ def from_dict(cls, data: dict) -> "User":
23
+ obj = cls()
24
+ if "id" in data and data["id"] is not None:
25
+ obj.id = uuid.UUID(str(data["id"]))
26
+ if "adId" in data and data["adId"] is not None:
27
+ obj.ad_id = uuid.UUID(str(data["adId"]))
28
+ obj.first_name = data.get("firstName")
29
+ obj.last_name = data.get("lastName")
30
+ obj.email = data.get("email")
31
+ obj.phone = data.get("phone")
32
+ raw_type = data.get("userType")
33
+ if raw_type is not None:
34
+ obj.user_type = UserType(int(raw_type))
35
+ return obj
36
+
37
+ def to_dict(self) -> dict:
38
+ obj = {}
39
+ if self.id is not None:
40
+ obj["id"] = str(self.id)
41
+ if self.ad_id is not None:
42
+ obj["adId"] = str(self.ad_id)
43
+ if self.first_name is not None:
44
+ obj["firstName"] = self.first_name
45
+ if self.last_name is not None:
46
+ obj["lastName"] = self.last_name
47
+ if self.email is not None:
48
+ obj["email"] = self.email
49
+ if self.phone is not None:
50
+ obj["phone"] = self.phone
51
+ if self.user_type is not None:
52
+ obj["userType"] = self.user_type.value
53
+ return obj
54
+
55
+ def api_id(self) -> str | None:
56
+ return str(self.id) if self.id else None
57
+
58
+ def api_key(self) -> str | None:
59
+ return str(self.ad_id) if self.ad_id else None
60
+
61
+ def set_id(self, id_value):
62
+ self.id = uuid.UUID(str(id_value))
@@ -0,0 +1 @@
1
+ __version__ = "2.0.0.dev11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.0.0.dev10
3
+ Version: 2.0.0.dev11
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -42,6 +42,7 @@ wizata_dsapi/template.py
42
42
  wizata_dsapi/trigger.py
43
43
  wizata_dsapi/twin.py
44
44
  wizata_dsapi/twinregistration.py
45
+ wizata_dsapi/user.py
45
46
  wizata_dsapi/version.py
46
47
  wizata_dsapi/wizard_function.py
47
48
  wizata_dsapi/wizard_request.py
@@ -1 +0,0 @@
1
- __version__ = "2.0.0.dev10"