rdxz2-utill 0.0.9__tar.gz → 0.0.10__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.
Potentially problematic release.
This version of rdxz2-utill might be problematic. Click here for more details.
- {rdxz2_utill-0.0.9/src/rdxz2_utill.egg-info → rdxz2_utill-0.0.10}/PKG-INFO +1 -1
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/pyproject.toml +1 -1
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10/src/rdxz2_utill.egg-info}/PKG-INFO +1 -1
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_mb.py +13 -4
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/LICENSE +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/README.md +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/setup.cfg +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/SOURCES.txt +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/dependency_links.txt +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/entry_points.txt +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/requires.txt +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/top_level.txt +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/__init__.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/__init__.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_bq.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_conf.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_enc.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_main.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_pg.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/utill.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_bq.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_compare.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_const.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_csv.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_datetime.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_dict.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_encryption.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_env.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_file.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_gcs.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_input.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_json.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_pg.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_queue.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_string.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_style.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_tunnel.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_xlsx.py +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/templates/mb.json +0 -0
- {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/templates/pg.json +0 -0
|
@@ -12,6 +12,12 @@ from .my_dict import AutoPopulatingDict
|
|
|
12
12
|
from .my_env import MB_FILENAME
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
class UsersNotFoundException(Exception):
|
|
16
|
+
def __init__(self, username: list[str]):
|
|
17
|
+
self.message = f'User(s) {username} not exists'
|
|
18
|
+
super().__init__(self.message)
|
|
19
|
+
|
|
20
|
+
|
|
15
21
|
def _decode_collection_location_to_group(collections_dict: dict, location: str):
|
|
16
22
|
return ' > '.join(map(lambda x: collections_dict[x], map(int, location.strip('/').split('/'))))
|
|
17
23
|
|
|
@@ -98,7 +104,7 @@ class MB:
|
|
|
98
104
|
not_exists.append(email)
|
|
99
105
|
|
|
100
106
|
if not_exists:
|
|
101
|
-
raise
|
|
107
|
+
raise UsersNotFoundException(not_exists)
|
|
102
108
|
|
|
103
109
|
def create_user(self, first_name: str, last_name: str, email: str, group_ids: list):
|
|
104
110
|
self.send_request(HttpMethod.POST, 'api/user', {
|
|
@@ -111,7 +117,11 @@ class MB:
|
|
|
111
117
|
logger.info(f'✅ Create user {email}')
|
|
112
118
|
|
|
113
119
|
def deactivate_user_by_email(self, email: str):
|
|
114
|
-
|
|
120
|
+
try:
|
|
121
|
+
user = self.dict__user_email__user[email]
|
|
122
|
+
except KeyError as e:
|
|
123
|
+
raise UsersNotFoundException([email])
|
|
124
|
+
|
|
115
125
|
self.send_request(HttpMethod.DELETE, f'api/user/{user["id"]}')
|
|
116
126
|
del self.dict__user_email__user[email]
|
|
117
127
|
logger.info(f'✅ Deactivate user [{user["id"]}] {email}')
|
|
@@ -120,8 +130,7 @@ class MB:
|
|
|
120
130
|
try:
|
|
121
131
|
self.dict__user_email__user[email]
|
|
122
132
|
except KeyError as e:
|
|
123
|
-
|
|
124
|
-
raise e
|
|
133
|
+
raise UsersNotFoundException([email])
|
|
125
134
|
self.send_request(HttpMethod.POST, 'api/session/forgot_password', {'email': email})
|
|
126
135
|
logger.info(f'✅ Reset password {email}')
|
|
127
136
|
|
|
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
|