hestia-earth-utils 0.15.12__py3-none-any.whl → 0.15.13__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.
@@ -100,12 +100,16 @@ def _list_bucket_objects(bucket: str, folder: str = ''):
100
100
  def _delete_objects(bucket: str, objects: list):
101
101
  from botocore.exceptions import ClientError
102
102
  try:
103
- return _get_s3_client().delete_objects(
104
- Bucket=bucket,
105
- Delete={
106
- 'Objects': objects,
107
- 'Quiet': True
108
- }
109
- )
103
+ # delete in batch of 1000 max allowed
104
+ batch_size = 1000
105
+ for i in range(0, len(objects), batch_size):
106
+ batch_objects = objects[i:i + batch_size]
107
+ _get_s3_client().delete_objects(
108
+ Bucket=bucket,
109
+ Delete={
110
+ 'Objects': batch_objects,
111
+ 'Quiet': True
112
+ }
113
+ )
110
114
  except ClientError:
111
115
  return None
@@ -1 +1 @@
1
- VERSION = '0.15.12'
1
+ VERSION = '0.15.13'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hestia-earth-utils
3
- Version: 0.15.12
3
+ Version: 0.15.13
4
4
  Summary: HESTIA's utils library
5
5
  Home-page: https://gitlab.com/hestia-earth/hestia-utils
6
6
  Author: HESTIA Team
@@ -16,7 +16,7 @@ hestia_earth/utils/stats.py,sha256=4t3op10xDJbGxWJEY1Jtyl302PYWyMFwLpsSkMlzQn8,3
16
16
  hestia_earth/utils/table.py,sha256=RrTt-KF_QzjKiCpaAueoG6La1FG-Iusxw5NMDpoRBpQ,2861
17
17
  hestia_earth/utils/term.py,sha256=6LiUSc6KX3IOkfWF6fYkQ2tENCO8ENljcdDypxU6WtA,1060
18
18
  hestia_earth/utils/tools.py,sha256=9GaUJwxL-CTzEOGnRFkUQDVFelPevQSxXrf25vssCVo,4990
19
- hestia_earth/utils/version.py,sha256=FIme604vbiU4T9z4gwoIVn3UuAZ9AM0H0NQDOakQrug,20
19
+ hestia_earth/utils/version.py,sha256=5syqDmwsh4jIBj3VfUqrt5VKjwrVJ6GbwjH-C3XXOW0,20
20
20
  hestia_earth/utils/pivot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  hestia_earth/utils/pivot/_shared.py,sha256=MB9074xkgKO9D_B6tWM-pdOlpjP_9itWpAHAzkA_1to,914
22
22
  hestia_earth/utils/pivot/pivot_csv.py,sha256=Ed-sCKEqVIFJu71AncS7zlMkHbw5V15QLd5c5B_uxiE,12296
@@ -24,14 +24,14 @@ hestia_earth/utils/pivot/pivot_json.py,sha256=Ld0SmUa-2aJ2pHOyicLujBP8KpBT_FnYNc
24
24
  hestia_earth/utils/storage/__init__.py,sha256=uNX6_EHWWnNUIm4Ng7L43-cQmuc6NGFAxXye85saIXQ,922
25
25
  hestia_earth/utils/storage/_azure_client.py,sha256=sevCZni04eknMql2DgUsWG23f7u0KvsXP7me1ZUBy00,1274
26
26
  hestia_earth/utils/storage/_local_client.py,sha256=IbzziUKY0QS3ybHFfgEpELqvafa7hQnZ-DdGdjQuypE,515
27
- hestia_earth/utils/storage/_s3_client.py,sha256=aWt4i_vObcTDWcwyzOOnBBnMv1rxPZV3AJZQMn96Hok,2975
27
+ hestia_earth/utils/storage/_s3_client.py,sha256=B2yTsf-VfHcRLCKTMes4S_nCXxrZad9umyZx3b5Pu_c,3181
28
28
  hestia_earth/utils/storage/_sns_client.py,sha256=LowUatj78Egu6_Id6Rr7hZjfZx1WguS3lozB3yAwSps,347
29
- hestia_earth_utils-0.15.12.data/scripts/hestia-format-upload,sha256=IhLAHHPJqRgUcht-M_EUEsRMbRbMfshig07o488zscM,703
30
- hestia_earth_utils-0.15.12.data/scripts/hestia-pivot-csv,sha256=0YBuGuyPO8rytod6iwWEKiQdSlr9JLuD001k6U5t6no,1163
29
+ hestia_earth_utils-0.15.13.data/scripts/hestia-format-upload,sha256=IhLAHHPJqRgUcht-M_EUEsRMbRbMfshig07o488zscM,703
30
+ hestia_earth_utils-0.15.13.data/scripts/hestia-pivot-csv,sha256=0YBuGuyPO8rytod6iwWEKiQdSlr9JLuD001k6U5t6no,1163
31
31
  tests/pivot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  tests/pivot/test_pivot_csv.py,sha256=aYni7o3QDPSgtVxVCspEetotgpYHY7Lz5VHf-DR89gw,8131
33
33
  tests/pivot/test_pivot_json.py,sha256=UYTAN4AZhzVicIYsU1A2VgJcctUXohjHppg6s-pqwcg,8287
34
- hestia_earth_utils-0.15.12.dist-info/METADATA,sha256=UOz7R7bJK_Jsn0TwLZAxfmQEi1dBs61oOavGzF7TR18,1758
35
- hestia_earth_utils-0.15.12.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
36
- hestia_earth_utils-0.15.12.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
37
- hestia_earth_utils-0.15.12.dist-info/RECORD,,
34
+ hestia_earth_utils-0.15.13.dist-info/METADATA,sha256=h7PwUmrXsdi-9A5he9kr62Gi3aofUQY9UuQdsgAPU60,1758
35
+ hestia_earth_utils-0.15.13.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
36
+ hestia_earth_utils-0.15.13.dist-info/top_level.txt,sha256=1dqA9TqpOLTEgpqa-YBsmbCmmNU1y56AtfFGEceZ2A0,19
37
+ hestia_earth_utils-0.15.13.dist-info/RECORD,,