pyaws-s3 1.0.16__py3-none-any.whl → 1.0.17__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 CHANGED
@@ -495,10 +495,18 @@ class S3Client:
495
495
  objects = s3_client.list_objects_v2(Bucket=self.bucket_name, Prefix=prefix)
496
496
 
497
497
  # Check if the bucket contains any objects
498
+ docs : list[str] = []
498
499
  if 'Contents' in objects:
499
- return [obj['Key'] for obj in objects['Contents'] if filter in obj['Key']]
500
- else:
501
- return []
500
+ for obj in objects['Contents']:
501
+ if obj['Key']:
502
+ # Log the object key
503
+ if filter is not None:
504
+ if filter in obj['Key']:
505
+ logger.info(f"Object: {obj['Key']}")
506
+ docs.append(obj['Key'])
507
+ else:
508
+ docs.append(obj['Key'])
509
+ return docs
502
510
  except Exception as e:
503
511
  logger.error(f"Error listing files: {str(e)}")
504
512
  raise Exception(f"Error listing files: {str(e)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyaws_s3
3
- Version: 1.0.16
3
+ Version: 1.0.17
4
4
  Summary: A Python package for AWS S3 utilities
5
5
  Author-email: Giuseppe Zileni <giuseppe.zileni@gmail.com>
6
6
  Keywords: aws,s3,utilities
@@ -0,0 +1,7 @@
1
+ pyaws_s3/__init__.py,sha256=Tr7xJiCKOMWYydOJ4kxHlA7AR1X3pRsJ8MjxJev2wsw,24
2
+ pyaws_s3/s3.py,sha256=ZuhqpK5uwL-0jxnKXoT-nil0QnzApNXxHUSyGypk1sc,20366
3
+ pyaws_s3-1.0.17.dist-info/licenses/LICENSE.md,sha256=7WXohDebeZpcVn_nH2aIaLhFZRvZBdcPSqWsO12lhwM,1074
4
+ pyaws_s3-1.0.17.dist-info/METADATA,sha256=HpIOBvZPjsHDaEOuzMOlpYOzO1sy13OH5w3O37pxorg,5465
5
+ pyaws_s3-1.0.17.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
6
+ pyaws_s3-1.0.17.dist-info/top_level.txt,sha256=MxSSC4Q8Vr32wKgrUAlwT4BTXwqUaG_CAWoBuPeXYjQ,9
7
+ pyaws_s3-1.0.17.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- pyaws_s3/__init__.py,sha256=Tr7xJiCKOMWYydOJ4kxHlA7AR1X3pRsJ8MjxJev2wsw,24
2
- pyaws_s3/s3.py,sha256=0suRKzfPyWSlQk1IWzbCruyyHTKV5mW9jZ7RBtwGCCA,20008
3
- pyaws_s3-1.0.16.dist-info/licenses/LICENSE.md,sha256=7WXohDebeZpcVn_nH2aIaLhFZRvZBdcPSqWsO12lhwM,1074
4
- pyaws_s3-1.0.16.dist-info/METADATA,sha256=KvwlP3WqEe96Mvcq-cvsRFI06yHAxTjhSJYEr0brg-I,5465
5
- pyaws_s3-1.0.16.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
6
- pyaws_s3-1.0.16.dist-info/top_level.txt,sha256=MxSSC4Q8Vr32wKgrUAlwT4BTXwqUaG_CAWoBuPeXYjQ,9
7
- pyaws_s3-1.0.16.dist-info/RECORD,,