persidict 0.32.2__py3-none-any.whl → 0.32.3__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.
Potentially problematic release.
This version of persidict might be problematic. Click here for more details.
- persidict/__init__.py +0 -0
- persidict/file_dir_dict.py +0 -0
- persidict/jokers.py +0 -0
- persidict/overlapping_multi_dict.py +0 -0
- persidict/persi_dict.py +0 -0
- persidict/s3_dict.py +25 -21
- persidict/safe_chars.py +0 -0
- persidict/safe_str_tuple.py +0 -0
- persidict/safe_str_tuple_signing.py +0 -0
- persidict/write_once_dict.py +0 -0
- {persidict-0.32.2.dist-info → persidict-0.32.3.dist-info}/METADATA +1 -1
- persidict-0.32.3.dist-info/RECORD +13 -0
- {persidict-0.32.2.dist-info → persidict-0.32.3.dist-info}/WHEEL +1 -1
- persidict-0.32.2.dist-info/RECORD +0 -13
persidict/__init__.py
CHANGED
|
File without changes
|
persidict/file_dir_dict.py
CHANGED
|
File without changes
|
persidict/jokers.py
CHANGED
|
File without changes
|
|
File without changes
|
persidict/persi_dict.py
CHANGED
|
File without changes
|
persidict/s3_dict.py
CHANGED
|
@@ -253,16 +253,18 @@ class S3Dict(PersiDict):
|
|
|
253
253
|
num_files = 0
|
|
254
254
|
suffix = "." + self.file_type
|
|
255
255
|
|
|
256
|
-
paginator = self.s3_client.get_paginator("
|
|
256
|
+
paginator = self.s3_client.get_paginator("list_objects_v2")
|
|
257
257
|
page_iterator = paginator.paginate(
|
|
258
258
|
Bucket=self.bucket_name, Prefix = self.root_prefix)
|
|
259
259
|
|
|
260
260
|
for page in page_iterator:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
261
|
+
contents = page.get("Contents")
|
|
262
|
+
if not contents:
|
|
263
|
+
continue
|
|
264
|
+
for key in contents:
|
|
265
|
+
obj_name = key["Key"]
|
|
266
|
+
if obj_name.endswith(suffix):
|
|
267
|
+
num_files += 1
|
|
266
268
|
|
|
267
269
|
return num_files
|
|
268
270
|
|
|
@@ -280,25 +282,27 @@ class S3Dict(PersiDict):
|
|
|
280
282
|
return SafeStrTuple(result)
|
|
281
283
|
|
|
282
284
|
def step():
|
|
283
|
-
paginator = self.s3_client.get_paginator("
|
|
285
|
+
paginator = self.s3_client.get_paginator("list_objects_v2")
|
|
284
286
|
page_iterator = paginator.paginate(
|
|
285
287
|
Bucket=self.bucket_name, Prefix = self.root_prefix)
|
|
286
288
|
|
|
287
289
|
for page in page_iterator:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
290
|
+
contents = page.get("Contents")
|
|
291
|
+
if not contents:
|
|
292
|
+
continue
|
|
293
|
+
for key in contents:
|
|
294
|
+
obj_name = key["Key"]
|
|
295
|
+
if not obj_name.endswith(suffix):
|
|
296
|
+
continue
|
|
297
|
+
obj_key = splitter(obj_name)
|
|
298
|
+
if iter_type == "keys":
|
|
299
|
+
yield unsign_safe_str_tuple(
|
|
300
|
+
obj_key, self.digest_len)
|
|
301
|
+
elif iter_type == "values":
|
|
302
|
+
yield self[obj_key]
|
|
303
|
+
else:
|
|
304
|
+
yield (unsign_safe_str_tuple(
|
|
305
|
+
obj_key, self.digest_len), self[obj_key])
|
|
302
306
|
|
|
303
307
|
return step()
|
|
304
308
|
|
persidict/safe_chars.py
CHANGED
|
File without changes
|
persidict/safe_str_tuple.py
CHANGED
|
File without changes
|
|
File without changes
|
persidict/write_once_dict.py
CHANGED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: persidict
|
|
3
|
-
Version: 0.32.
|
|
3
|
+
Version: 0.32.3
|
|
4
4
|
Summary: Simple persistent key-value store for Python. Values are stored as files on a disk or as S3 objects on AWS cloud.
|
|
5
5
|
Keywords: persistence,dicts,distributed,parallel
|
|
6
6
|
Author: Vlad (Volodymyr) Pavlov
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
persidict/__init__.py,sha256=CDOSJGgCnyRTkGUTzaeg3Cqsxwx0-0EFieOtldXwAls,1380
|
|
2
|
+
persidict/file_dir_dict.py,sha256=DGULotXBerZepd1SR1RPaMd-MCewIodrGOoZreUdeKY,17527
|
|
3
|
+
persidict/jokers.py,sha256=kX4bE-jKWTM2ki7JOmm_2uJS8zm8u6InZ_V12xo2ImI,1436
|
|
4
|
+
persidict/overlapping_multi_dict.py,sha256=a-lUbmY15_HrDq6jSIt8F8tJboqbeYiuRQeW4elf_oU,2663
|
|
5
|
+
persidict/persi_dict.py,sha256=5PliQ331DgQi1YBXqyNEaAKpFtRq_WPmnJ_pGW8S9-g,12900
|
|
6
|
+
persidict/s3_dict.py,sha256=OCCVawtmCJM79K4xTvmbn6U2oZt49JZ-1MBoMx7o9m0,12348
|
|
7
|
+
persidict/safe_chars.py,sha256=WaIOliBdLlZ12CepEa1C3b1VPxvX4s2hvnZanCxM6BQ,565
|
|
8
|
+
persidict/safe_str_tuple.py,sha256=cTk5BL3r-yE62EKf7VngTaUpZAdsATJPIjiCGqQzkyU,3717
|
|
9
|
+
persidict/safe_str_tuple_signing.py,sha256=5uCjAVZRqOou-KpDZw-Exboc3-3vuayJMqrrt8aZ0ck,3742
|
|
10
|
+
persidict/write_once_dict.py,sha256=dqzA3amVDK9D8ygU8NFT5B87smAHYWdEn78Fssj6s_g,6396
|
|
11
|
+
persidict-0.32.3.dist-info/WHEEL,sha256=4n27za1eEkOnA7dNjN6C5-O2rUiw6iapszm14Uj-Qmk,79
|
|
12
|
+
persidict-0.32.3.dist-info/METADATA,sha256=5JSZ2ZGCbIndTyyIh0265V9A6S0hEMpm0Yn5erhzHuk,9334
|
|
13
|
+
persidict-0.32.3.dist-info/RECORD,,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
persidict/__init__.py,sha256=0833922468029f2453906513cda7a0dc2aacc70c74fb410589e3ad95d5f0025b,1380
|
|
2
|
-
persidict/file_dir_dict.py,sha256=0c650ba2d5c17ab65ea5dd5247544f68c77e3027b022876b18ea19ade51d78a6,17527
|
|
3
|
-
persidict/jokers.py,sha256=917e1b13e8ca593336922ec93a69bfdae252f339bcbba22767f575db1a362262,1436
|
|
4
|
-
persidict/overlapping_multi_dict.py,sha256=6be9546e6635e7f1eb0eaea3488b7c17cb496e8a9b7988ae450796e1e95ffe85,2663
|
|
5
|
-
persidict/persi_dict.py,sha256=e4f962437df50e0422d58057ab23446802a916d46afd63e69c9fe9196f12f7e8,12900
|
|
6
|
-
persidict/s3_dict.py,sha256=0d8942037cee409d8bda8f63f923a8385f4f9f1fac03e765ec5f5fc675334ae2,12292
|
|
7
|
-
persidict/safe_chars.py,sha256=59a20e96205d2e5675d827a911ad42ddbd553f1bd7e2cda1be765a9c2c4ce814,565
|
|
8
|
-
persidict/safe_str_tuple.py,sha256=71393904bdebfb213ad8429fed59e04da52964076c01324f2238821aa4339325,3717
|
|
9
|
-
persidict/safe_str_tuple_signing.py,sha256=e6e0a3015651a8ea2ef8aa43670f84c5ba1cdfedefb9ac8932aaebb7c699d1c9,3742
|
|
10
|
-
persidict/write_once_dict.py,sha256=76acc0dda9950caf43f32814f0d153e41f3bb260076167449fbf05b2c8fab3f8,6396
|
|
11
|
-
persidict-0.32.2.dist-info/WHEEL,sha256=607c46fee47e440c91332c738096ff0f5e54ca3b0818ee85462dd5172a38e793,79
|
|
12
|
-
persidict-0.32.2.dist-info/METADATA,sha256=54072df5d3f92135b1ff868e96bf0de7a406185f243090b3725c0b5d46acf736,9334
|
|
13
|
-
persidict-0.32.2.dist-info/RECORD,,
|