diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-20 19:16:07 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-20 19:16:07 +0000 |
| commit | 04157bd1736b4997f549be8b79713448c2cceea3 (patch) | |
| tree | 3c60494f3eed4e97f9ff6a4bcbb18f11179658e3 /gdpr_obfuscator/read.py | |
| parent | ff3a5630fe5440f61fffc2b2732ba38fad2b67a7 (diff) | |
| download | gdpr-obfuscator-04157bd1736b4997f549be8b79713448c2cceea3.tar.gz gdpr-obfuscator-04157bd1736b4997f549be8b79713448c2cceea3.zip | |
return byte stream from read_s3 using create_byte_stream method
Diffstat (limited to 'gdpr_obfuscator/read.py')
| -rw-r--r-- | gdpr_obfuscator/read.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdpr_obfuscator/read.py b/gdpr_obfuscator/read.py index b1ffc2f..8dd3e25 100644 --- a/gdpr_obfuscator/read.py +++ b/gdpr_obfuscator/read.py @@ -49,7 +49,8 @@ class DataReader: response = client.get_object(Bucket=bucket, Key=key) self.logger.info("S3 object read successfully") content = response["Body"].read().decode("utf-8") - return self.read_string(content) + read_csv_content = self.read_string(content) + return utils.create_byte_stream(read_csv_content) except client.exceptions.NoSuchKey: self.logger.error(f"Object not found: {bucket}/{key}") raise |
