wizata-dsapi 1.3.36__py3-none-any.whl → 1.3.38__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/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.36"
1
+ __version__ = "1.3.38"
@@ -15,6 +15,7 @@ import os
15
15
  import types
16
16
  import wizata_dsapi
17
17
  import urllib.parse
18
+ import base64
18
19
 
19
20
  import string
20
21
  import random
@@ -221,6 +222,26 @@ class WizataDSAPIClient(ApiInterface):
221
222
  self._process_request(method='GET', route='whoami/')
222
223
  return self.roles, self.twins
223
224
 
225
+ def who_am_i(self):
226
+ """
227
+ decrypt current JWT token used to get information about current user.
228
+ :return:
229
+ """
230
+ token = self.__token()
231
+ if token is None:
232
+ return {}
233
+ parts = token.split('.')
234
+ if len(parts) != 3:
235
+ return None # not a JWT
236
+ _, payload_b64, _ = parts
237
+ def _b64url_decode(input_str: str) -> bytes:
238
+ rem = len(input_str) % 4
239
+ if rem:
240
+ input_str += '=' * (4 - rem)
241
+ return base64.urlsafe_b64decode(input_str.encode('utf-8'))
242
+ payload_json = json.loads(_b64url_decode(payload_b64).decode('utf-8'))
243
+ return payload_json
244
+
224
245
  def _process_request(self,
225
246
  method: str,
226
247
  route: str,
@@ -1111,7 +1132,8 @@ class WizataDSAPIClient(ApiInterface):
1111
1132
  file: wizata_dsapi.ModelFile
1112
1133
  if file.name != "trained_model":
1113
1134
  headers["Content-Type"] = "application/octet-stream"
1114
- response = requests.post(self.__url() + f"models/{model_info.identifier(include_alias=True)}/files/{file.name}",
1135
+ response = requests.post(self.__url() + f"models/{model_info.identifier(include_alias=True)}/files/{file.path}",
1136
+ headers=headers,
1115
1137
  data=file.content,
1116
1138
  timeout=60)
1117
1139
  if response.status_code != 200 and response.status_code != 201:
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: wizata_dsapi
3
+ Version: 1.3.38
4
+ Summary: Wizata Data Science Toolkit
5
+ Author: Wizata S.A.
6
+ Author-email: info@wizata.com
7
+ License-File: LICENSE.txt
8
+ Requires-Dist: pandas==1.5.3; python_version < "3.11"
9
+ Requires-Dist: pandas==2.2.3; python_version >= "3.11" and python_version < "3.12"
10
+ Requires-Dist: pandas>=2.3.3; python_version >= "3.12"
11
+ Requires-Dist: numpy==1.26.4; python_version < "3.12"
12
+ Requires-Dist: numpy>=2.3.3; python_version >= "3.12"
13
+ Requires-Dist: dill==0.3.6; python_version < "3.12"
14
+ Requires-Dist: dill==0.4.0; python_version >= "3.12"
15
+ Requires-Dist: protobuf==3.20.3; python_version < "3.11"
16
+ Requires-Dist: protobuf==5.29.5; python_version >= "3.11" and python_version < "3.12"
17
+ Requires-Dist: protobuf>=5.29.5; python_version >= "3.12"
18
+ Requires-Dist: msal==1.30.0; python_version < "3.12"
19
+ Requires-Dist: msal>=1.34.0; python_version >= "3.12"
20
+ Requires-Dist: joblib==1.5.2; python_version < "3.12"
21
+ Requires-Dist: joblib>=1.2.0; python_version >= "3.12"
22
+ Requires-Dist: requests==2.28.2; python_version < "3.11"
23
+ Requires-Dist: requests>=2.32.5; python_version >= "3.11"
24
+ Requires-Dist: setuptools==67.6.0; python_version < "3.11"
25
+ Requires-Dist: setuptools>=80.9.0; python_version >= "3.11"
26
+ Requires-Dist: plotly==5.13.1; python_version < "3.12"
27
+ Requires-Dist: plotly>=6.3.1; python_version >= "3.12"
28
+ Provides-Extra: all
29
+ Requires-Dist: pandas==1.5.3; python_version < "3.11" and extra == "all"
30
+ Requires-Dist: pandas==2.2.3; (python_version >= "3.11" and python_version < "3.12") and extra == "all"
31
+ Requires-Dist: pandas>=2.3.3; python_version >= "3.12" and extra == "all"
32
+ Requires-Dist: numpy==1.26.4; python_version < "3.12" and extra == "all"
33
+ Requires-Dist: numpy>=2.3.3; python_version >= "3.12" and extra == "all"
34
+ Requires-Dist: dill==0.3.6; python_version < "3.12" and extra == "all"
35
+ Requires-Dist: dill==0.4.0; python_version >= "3.12" and extra == "all"
36
+ Requires-Dist: protobuf==3.20.3; python_version < "3.11" and extra == "all"
37
+ Requires-Dist: protobuf==5.29.5; (python_version >= "3.11" and python_version < "3.12") and extra == "all"
38
+ Requires-Dist: protobuf>=5.29.5; python_version >= "3.12" and extra == "all"
39
+ Requires-Dist: msal==1.30.0; python_version < "3.12" and extra == "all"
40
+ Requires-Dist: msal>=1.34.0; python_version >= "3.12" and extra == "all"
41
+ Requires-Dist: joblib==1.5.2; python_version < "3.12" and extra == "all"
42
+ Requires-Dist: joblib>=1.2.0; python_version >= "3.12" and extra == "all"
43
+ Requires-Dist: requests==2.28.2; python_version < "3.11" and extra == "all"
44
+ Requires-Dist: requests>=2.32.5; python_version >= "3.11" and extra == "all"
45
+ Requires-Dist: setuptools==67.6.0; python_version < "3.11" and extra == "all"
46
+ Requires-Dist: setuptools>=80.9.0; python_version >= "3.11" and extra == "all"
47
+ Requires-Dist: plotly==5.13.1; python_version < "3.12" and extra == "all"
48
+ Requires-Dist: plotly>=6.3.1; python_version >= "3.12" and extra == "all"
49
+ Requires-Dist: matplotlib==3.7.1; python_version < "3.11" and extra == "all"
50
+ Requires-Dist: matplotlib>=3.10.6; python_version >= "3.11" and extra == "all"
51
+ Requires-Dist: tensorflow>=2.15.0; ((sys_platform != "darwin" or platform_machine != "arm64") and python_version < "3.12") and extra == "all"
52
+ Requires-Dist: tensorflow-macos>=2.15.0; (sys_platform == "darwin" and platform_machine == "arm64" and python_version < "3.12") and extra == "all"
53
+ Requires-Dist: tensorflow>=2.20.0; python_version >= "3.12" and extra == "all"
54
+ Requires-Dist: keras==2.15.0; python_version < "3.12" and extra == "all"
55
+ Requires-Dist: keras>=3.11.3; python_version >= "3.12" and extra == "all"
56
+ Requires-Dist: tensorflow_probability==0.15.0; python_version < "3.12" and extra == "all"
57
+ Requires-Dist: tensorflow_probability>=0.25.0; python_version >= "3.12" and extra == "all"
58
+ Requires-Dist: scikit-learn==1.2.2; python_version < "3.12" and extra == "all"
59
+ Requires-Dist: scikit-learn>=1.7.2; python_version >= "3.12" and extra == "all"
60
+ Requires-Dist: adtk==0.6.2; extra == "all"
61
+ Requires-Dist: scipy==1.10.1; python_version < "3.12" and extra == "all"
62
+ Requires-Dist: scipy>=1.16.2; python_version >= "3.12" and extra == "all"
63
+ Requires-Dist: xgboost==1.7.4; python_version < "3.12" and extra == "all"
64
+ Requires-Dist: xgboost>=3.0.5; python_version >= "3.12" and extra == "all"
65
+ Requires-Dist: u8darts==0.25.0; python_version < "3.12" and extra == "all"
66
+ Requires-Dist: u8darts>=0.38.0; python_version >= "3.12" and extra == "all"
67
+ Requires-Dist: optuna==3.3.0; python_version < "3.12" and extra == "all"
68
+ Requires-Dist: optuna>=4.5.0; python_version >= "3.12" and extra == "all"
69
+ Requires-Dist: explainerdashboard==0.4.2.1; python_version < "3.12" and extra == "all"
70
+ Requires-Dist: ipywidgets==8.0.4; python_version < "3.12" and extra == "all"
71
+ Requires-Dist: ipywidgets>=8.1.7; python_version >= "3.12" and extra == "all"
72
+ Requires-Dist: kaleido==0.2.1; python_version < "3.12" and extra == "all"
73
+ Requires-Dist: kaleido>=1.1.0; python_version >= "3.12" and extra == "all"
74
+ Requires-Dist: pytest==7.2.2; python_version < "3.12" and extra == "all"
75
+ Requires-Dist: pytest>=8.4.2; python_version >= "3.12" and extra == "all"
76
+ Requires-Dist: pytest-cov==4.0.0; python_version < "3.12" and extra == "all"
77
+ Requires-Dist: pytest-cov>=7.0.0; python_version >= "3.12" and extra == "all"
78
+ Requires-Dist: shapely==2.0.1; python_version < "3.12" and extra == "all"
79
+ Requires-Dist: shapely>=2.1.2; python_version >= "3.12" and extra == "all"
80
+ Requires-Dist: pyodbc==4.0.35; python_version < "3.12" and extra == "all"
81
+ Requires-Dist: pyodbc>=5.2.0; python_version >= "3.12" and extra == "all"
82
+ Requires-Dist: torch==2.7.1; (python_version >= "3.11" and python_version < "3.12") and extra == "all"
83
+ Requires-Dist: torch>=2.8.0; python_version >= "3.12" and extra == "all"
84
+ Dynamic: author
85
+ Dynamic: author-email
86
+ Dynamic: license-file
87
+ Dynamic: provides-extra
88
+ Dynamic: requires-dist
89
+ Dynamic: summary
@@ -31,10 +31,10 @@ wizata_dsapi/template.py,sha256=wtCRKKk3PchH4RrNgNYlEF_9C6bzZwKIeLyEvgv6Fdo,1370
31
31
  wizata_dsapi/trigger.py,sha256=w3BZYP-L3SUwvaT0oCTanh_Ewn57peZvlt7vxzHv9J8,5129
32
32
  wizata_dsapi/twin.py,sha256=S0DUzQf1smZXZTdXpXZPtkZYCfKIhw53EecCnsl9i4Q,11017
33
33
  wizata_dsapi/twinregistration.py,sha256=Mi6-YuwroiEXc0c1hgrOaphh4hNVoHupxOnXedVtJtE,13377
34
- wizata_dsapi/version.py,sha256=BRWayE816feIKOA2gDVw4549ZSjpuCcSJW19cVRnPLs,23
34
+ wizata_dsapi/version.py,sha256=qXW83O8OT5jy3AbawruyllupLIZAtL1J8zRAjZqwknI,23
35
35
  wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
36
36
  wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
37
- wizata_dsapi/wizata_dsapi_client.py,sha256=xOVg-7hlN4gAS01E-mNglSDMS7t-5LqbpEa8hvGQVJU,77303
37
+ wizata_dsapi/wizata_dsapi_client.py,sha256=K7xukE_1O3-t1l2Arq6f0rlbMib2xL0oEFGvLqEBjzI,78067
38
38
  wizata_dsapi/words.py,sha256=tV8CqzCqODZCV7PgBxBF5exBxeF_ya9t5DiUy-cg6Sg,1535
39
39
  wizata_dsapi/models/__init__.py,sha256=O5PHqw8lKILw4apO-MfDxPz73wK0vADD9y3xjuzX7Tw,104
40
40
  wizata_dsapi/models/common.py,sha256=1dTqE80-mFJnUwEdNlJdhJzfZ2N5Kp8Nb3LQ8uwPtLc,3808
@@ -42,8 +42,8 @@ wizata_dsapi/plots/__init__.py,sha256=qgnSFqrjOPur-807M8uh5awIfjM1ZHXUXcAqHc-r2l
42
42
  wizata_dsapi/plots/common.py,sha256=jdPsJqLHBwSKc6dX83BSGPqSRxzIVNHSYO5yI_8sjGk,6568
43
43
  wizata_dsapi/scripts/__init__.py,sha256=hAxiETSQf0qOHde1si1tEAJU48seqEgHrchCzS2-LvQ,80
44
44
  wizata_dsapi/scripts/common.py,sha256=efwq-Rd0lvYljIs3gSFz9izogBD7asOU2cTK-IvHTkM,4244
45
- wizata_dsapi-1.3.36.dist-info/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
46
- wizata_dsapi-1.3.36.dist-info/METADATA,sha256=lTfmPDS4oQn_lwE9XRYhhig7raQMBLhhfVd4_R9G1ew,6119
47
- wizata_dsapi-1.3.36.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
48
- wizata_dsapi-1.3.36.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
49
- wizata_dsapi-1.3.36.dist-info/RECORD,,
45
+ wizata_dsapi-1.3.38.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
46
+ wizata_dsapi-1.3.38.dist-info/METADATA,sha256=ZN35wI7U4IL9bHa86MOmYI9S5Lf0INQ9p-aRaByzbbQ,5844
47
+ wizata_dsapi-1.3.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ wizata_dsapi-1.3.38.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
49
+ wizata_dsapi-1.3.38.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,84 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: wizata-dsapi
3
- Version: 1.3.36
4
- Summary: Wizata Data Science Toolkit
5
- Author: Wizata S.A.
6
- Author-email: info@wizata.com
7
- License-File: LICENSE.txt
8
- Requires-Dist: pandas (==1.5.3) ; python_version < "3.11"
9
- Requires-Dist: protobuf (==3.20.3) ; python_version < "3.11"
10
- Requires-Dist: requests (==2.28.2) ; python_version < "3.11"
11
- Requires-Dist: setuptools (==67.6.0) ; python_version < "3.11"
12
- Requires-Dist: numpy (==1.26.4) ; python_version < "3.12"
13
- Requires-Dist: dill (==0.3.6) ; python_version < "3.12"
14
- Requires-Dist: msal (==1.30.0) ; python_version < "3.12"
15
- Requires-Dist: joblib (==1.5.2) ; python_version < "3.12"
16
- Requires-Dist: plotly (==5.13.1) ; python_version < "3.12"
17
- Requires-Dist: requests (>=2.32.5) ; python_version >= "3.11"
18
- Requires-Dist: setuptools (>=80.9.0) ; python_version >= "3.11"
19
- Requires-Dist: pandas (==2.2.3) ; python_version >= "3.11" and python_version < "3.12"
20
- Requires-Dist: protobuf (==5.29.5) ; python_version >= "3.11" and python_version < "3.12"
21
- Requires-Dist: pandas (>=2.3.3) ; python_version >= "3.12"
22
- Requires-Dist: numpy (>=2.3.3) ; python_version >= "3.12"
23
- Requires-Dist: dill (==0.4.0) ; python_version >= "3.12"
24
- Requires-Dist: protobuf (>=5.29.5) ; python_version >= "3.12"
25
- Requires-Dist: msal (>=1.34.0) ; python_version >= "3.12"
26
- Requires-Dist: joblib (>=1.2.0) ; python_version >= "3.12"
27
- Requires-Dist: plotly (>=6.3.1) ; python_version >= "3.12"
28
- Provides-Extra: all
29
- Requires-Dist: adtk (==0.6.2) ; extra == 'all'
30
- Requires-Dist: tensorflow (>=2.15.0) ; ((sys_platform != "darwin" or platform_machine != "arm64") and python_version < "3.12") and extra == 'all'
31
- Requires-Dist: pandas (==1.5.3) ; (python_version < "3.11") and extra == 'all'
32
- Requires-Dist: protobuf (==3.20.3) ; (python_version < "3.11") and extra == 'all'
33
- Requires-Dist: requests (==2.28.2) ; (python_version < "3.11") and extra == 'all'
34
- Requires-Dist: setuptools (==67.6.0) ; (python_version < "3.11") and extra == 'all'
35
- Requires-Dist: matplotlib (==3.7.1) ; (python_version < "3.11") and extra == 'all'
36
- Requires-Dist: numpy (==1.26.4) ; (python_version < "3.12") and extra == 'all'
37
- Requires-Dist: dill (==0.3.6) ; (python_version < "3.12") and extra == 'all'
38
- Requires-Dist: msal (==1.30.0) ; (python_version < "3.12") and extra == 'all'
39
- Requires-Dist: joblib (==1.5.2) ; (python_version < "3.12") and extra == 'all'
40
- Requires-Dist: plotly (==5.13.1) ; (python_version < "3.12") and extra == 'all'
41
- Requires-Dist: keras (==2.15.0) ; (python_version < "3.12") and extra == 'all'
42
- Requires-Dist: tensorflow-probability (==0.15.0) ; (python_version < "3.12") and extra == 'all'
43
- Requires-Dist: scikit-learn (==1.2.2) ; (python_version < "3.12") and extra == 'all'
44
- Requires-Dist: scipy (==1.10.1) ; (python_version < "3.12") and extra == 'all'
45
- Requires-Dist: xgboost (==1.7.4) ; (python_version < "3.12") and extra == 'all'
46
- Requires-Dist: u8darts (==0.25.0) ; (python_version < "3.12") and extra == 'all'
47
- Requires-Dist: optuna (==3.3.0) ; (python_version < "3.12") and extra == 'all'
48
- Requires-Dist: explainerdashboard (==0.4.2.1) ; (python_version < "3.12") and extra == 'all'
49
- Requires-Dist: ipywidgets (==8.0.4) ; (python_version < "3.12") and extra == 'all'
50
- Requires-Dist: kaleido (==0.2.1) ; (python_version < "3.12") and extra == 'all'
51
- Requires-Dist: pytest (==7.2.2) ; (python_version < "3.12") and extra == 'all'
52
- Requires-Dist: pytest-cov (==4.0.0) ; (python_version < "3.12") and extra == 'all'
53
- Requires-Dist: shapely (==2.0.1) ; (python_version < "3.12") and extra == 'all'
54
- Requires-Dist: pyodbc (==4.0.35) ; (python_version < "3.12") and extra == 'all'
55
- Requires-Dist: requests (>=2.32.5) ; (python_version >= "3.11") and extra == 'all'
56
- Requires-Dist: setuptools (>=80.9.0) ; (python_version >= "3.11") and extra == 'all'
57
- Requires-Dist: matplotlib (>=3.10.6) ; (python_version >= "3.11") and extra == 'all'
58
- Requires-Dist: pandas (==2.2.3) ; (python_version >= "3.11" and python_version < "3.12") and extra == 'all'
59
- Requires-Dist: protobuf (==5.29.5) ; (python_version >= "3.11" and python_version < "3.12") and extra == 'all'
60
- Requires-Dist: torch (==2.7.1) ; (python_version >= "3.11" and python_version < "3.12") and extra == 'all'
61
- Requires-Dist: pandas (>=2.3.3) ; (python_version >= "3.12") and extra == 'all'
62
- Requires-Dist: numpy (>=2.3.3) ; (python_version >= "3.12") and extra == 'all'
63
- Requires-Dist: dill (==0.4.0) ; (python_version >= "3.12") and extra == 'all'
64
- Requires-Dist: protobuf (>=5.29.5) ; (python_version >= "3.12") and extra == 'all'
65
- Requires-Dist: msal (>=1.34.0) ; (python_version >= "3.12") and extra == 'all'
66
- Requires-Dist: joblib (>=1.2.0) ; (python_version >= "3.12") and extra == 'all'
67
- Requires-Dist: plotly (>=6.3.1) ; (python_version >= "3.12") and extra == 'all'
68
- Requires-Dist: tensorflow (>=2.20.0) ; (python_version >= "3.12") and extra == 'all'
69
- Requires-Dist: keras (>=3.11.3) ; (python_version >= "3.12") and extra == 'all'
70
- Requires-Dist: tensorflow-probability (>=0.25.0) ; (python_version >= "3.12") and extra == 'all'
71
- Requires-Dist: scikit-learn (>=1.7.2) ; (python_version >= "3.12") and extra == 'all'
72
- Requires-Dist: scipy (>=1.16.2) ; (python_version >= "3.12") and extra == 'all'
73
- Requires-Dist: xgboost (>=3.0.5) ; (python_version >= "3.12") and extra == 'all'
74
- Requires-Dist: u8darts (>=0.38.0) ; (python_version >= "3.12") and extra == 'all'
75
- Requires-Dist: optuna (>=4.5.0) ; (python_version >= "3.12") and extra == 'all'
76
- Requires-Dist: ipywidgets (>=8.1.7) ; (python_version >= "3.12") and extra == 'all'
77
- Requires-Dist: kaleido (>=1.1.0) ; (python_version >= "3.12") and extra == 'all'
78
- Requires-Dist: pytest (>=8.4.2) ; (python_version >= "3.12") and extra == 'all'
79
- Requires-Dist: pytest-cov (>=7.0.0) ; (python_version >= "3.12") and extra == 'all'
80
- Requires-Dist: shapely (>=2.1.2) ; (python_version >= "3.12") and extra == 'all'
81
- Requires-Dist: pyodbc (>=5.2.0) ; (python_version >= "3.12") and extra == 'all'
82
- Requires-Dist: torch (>=2.8.0) ; (python_version >= "3.12") and extra == 'all'
83
- Requires-Dist: tensorflow-macos (>=2.15.0) ; (sys_platform == "darwin" and platform_machine == "arm64" and python_version < "3.12") and extra == 'all'
84
-