pyaws-s3 1.0.12__py3-none-any.whl → 1.0.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.
- pyaws_s3/s3.py +11 -3
- {pyaws_s3-1.0.12.dist-info → pyaws_s3-1.0.13.dist-info}/METADATA +1 -1
- pyaws_s3-1.0.13.dist-info/RECORD +7 -0
- pyaws_s3-1.0.12.dist-info/RECORD +0 -7
- {pyaws_s3-1.0.12.dist-info → pyaws_s3-1.0.13.dist-info}/WHEEL +0 -0
- {pyaws_s3-1.0.12.dist-info → pyaws_s3-1.0.13.dist-info}/licenses/LICENSE.md +0 -0
- {pyaws_s3-1.0.12.dist-info → pyaws_s3-1.0.13.dist-info}/top_level.txt +0 -0
pyaws_s3/s3.py
CHANGED
@@ -470,7 +470,7 @@ class S3Client:
|
|
470
470
|
logger.error(f"Error downloading file: {str(e)}")
|
471
471
|
raise Exception(f"Error downloading file: {str(e)}")
|
472
472
|
|
473
|
-
def list_files(self, *args : Any) -> list[str]:
|
473
|
+
def list_files(self, *args: Any, **kwargs : Any) -> list[str]:
|
474
474
|
"""
|
475
475
|
List all files in the S3 bucket.
|
476
476
|
|
@@ -482,9 +482,17 @@ class S3Client:
|
|
482
482
|
list[str]: List of file names in the S3 bucket.
|
483
483
|
"""
|
484
484
|
try:
|
485
|
-
|
485
|
+
prefix = args[0] if args else None
|
486
|
+
if prefix is None:
|
487
|
+
prefix = kwargs.get("prefix", None)
|
488
|
+
|
489
|
+
if prefix is None:
|
490
|
+
raise Exception("Prefix is None")
|
491
|
+
|
492
|
+
filter = kwargs.get("filter", None)
|
493
|
+
|
486
494
|
s3_client = self._get_s3_client()
|
487
|
-
objects = s3_client.list_objects_v2(Bucket=self.bucket_name)
|
495
|
+
objects = s3_client.list_objects_v2(Bucket=self.bucket_name, Prefix=prefix)
|
488
496
|
|
489
497
|
# Check if the bucket contains any objects
|
490
498
|
if 'Contents' in objects:
|
@@ -0,0 +1,7 @@
|
|
1
|
+
pyaws_s3/__init__.py,sha256=Tr7xJiCKOMWYydOJ4kxHlA7AR1X3pRsJ8MjxJev2wsw,24
|
2
|
+
pyaws_s3/s3.py,sha256=0suRKzfPyWSlQk1IWzbCruyyHTKV5mW9jZ7RBtwGCCA,20008
|
3
|
+
pyaws_s3-1.0.13.dist-info/licenses/LICENSE.md,sha256=7WXohDebeZpcVn_nH2aIaLhFZRvZBdcPSqWsO12lhwM,1074
|
4
|
+
pyaws_s3-1.0.13.dist-info/METADATA,sha256=JSQ_qpZHM-UMvbVDWudsLiMVPRqodRKLpmtqBlN0zA8,5493
|
5
|
+
pyaws_s3-1.0.13.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
6
|
+
pyaws_s3-1.0.13.dist-info/top_level.txt,sha256=MxSSC4Q8Vr32wKgrUAlwT4BTXwqUaG_CAWoBuPeXYjQ,9
|
7
|
+
pyaws_s3-1.0.13.dist-info/RECORD,,
|
pyaws_s3-1.0.12.dist-info/RECORD
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
pyaws_s3/__init__.py,sha256=Tr7xJiCKOMWYydOJ4kxHlA7AR1X3pRsJ8MjxJev2wsw,24
|
2
|
-
pyaws_s3/s3.py,sha256=ZkYeD96LeoovDHR49G9LE1jhCssAN_bObmG9n85euWI,19723
|
3
|
-
pyaws_s3-1.0.12.dist-info/licenses/LICENSE.md,sha256=7WXohDebeZpcVn_nH2aIaLhFZRvZBdcPSqWsO12lhwM,1074
|
4
|
-
pyaws_s3-1.0.12.dist-info/METADATA,sha256=p-RlVIVY4nqB0b6eS6AXPIgmsyvMBRlAPZewHOaV2C4,5493
|
5
|
-
pyaws_s3-1.0.12.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
6
|
-
pyaws_s3-1.0.12.dist-info/top_level.txt,sha256=MxSSC4Q8Vr32wKgrUAlwT4BTXwqUaG_CAWoBuPeXYjQ,9
|
7
|
-
pyaws_s3-1.0.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|