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.

Files changed (40) hide show
  1. {rdxz2_utill-0.0.9/src/rdxz2_utill.egg-info → rdxz2_utill-0.0.10}/PKG-INFO +1 -1
  2. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/pyproject.toml +1 -1
  3. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10/src/rdxz2_utill.egg-info}/PKG-INFO +1 -1
  4. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_mb.py +13 -4
  5. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/LICENSE +0 -0
  6. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/README.md +0 -0
  7. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/setup.cfg +0 -0
  8. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/SOURCES.txt +0 -0
  9. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/dependency_links.txt +0 -0
  10. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/entry_points.txt +0 -0
  11. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/requires.txt +0 -0
  12. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/rdxz2_utill.egg-info/top_level.txt +0 -0
  13. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/__init__.py +0 -0
  14. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/__init__.py +0 -0
  15. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_bq.py +0 -0
  16. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_conf.py +0 -0
  17. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_enc.py +0 -0
  18. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_main.py +0 -0
  19. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/_pg.py +0 -0
  20. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/cmd/utill.py +0 -0
  21. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_bq.py +0 -0
  22. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_compare.py +0 -0
  23. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_const.py +0 -0
  24. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_csv.py +0 -0
  25. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_datetime.py +0 -0
  26. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_dict.py +0 -0
  27. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_encryption.py +0 -0
  28. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_env.py +0 -0
  29. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_file.py +0 -0
  30. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_gcs.py +0 -0
  31. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_input.py +0 -0
  32. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_json.py +0 -0
  33. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_pg.py +0 -0
  34. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_queue.py +0 -0
  35. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_string.py +0 -0
  36. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_style.py +0 -0
  37. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_tunnel.py +0 -0
  38. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/my_xlsx.py +0 -0
  39. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/templates/mb.json +0 -0
  40. {rdxz2_utill-0.0.9 → rdxz2_utill-0.0.10}/src/utill/templates/pg.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdxz2-utill
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Your daily Python utility
5
5
  Author-email: Richard Dharmawan <richard.dharmawan@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rdxz2-utill"
7
- version = "0.0.9"
7
+ version = "0.0.10"
8
8
  authors = [
9
9
  { name="Richard Dharmawan", email="richard.dharmawan@gmail.com" },
10
10
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdxz2-utill
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: Your daily Python utility
5
5
  Author-email: Richard Dharmawan <richard.dharmawan@gmail.com>
6
6
  License: MIT License
@@ -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 ValueError(f'Email not exists: {not_exists}')
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
- user = self.dict__user_email__user[email]
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
- logger.error(f'User {email} not exists')
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