my-aws-helpers 4.0.0__tar.gz → 4.2.0__tar.gz
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 my-aws-helpers might be problematic. Click here for more details.
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/PKG-INFO +1 -1
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/s3.py +18 -1
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers.egg-info/PKG-INFO +1 -1
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/setup.py +1 -1
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/MANIFEST.in +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/README.md +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/api.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/auth.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/bedrock.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/cognito.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/dynamo.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/errors.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/event.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/logging.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/__init__.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/markdown_system_prompt.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/transactions_headers_prompt.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/transactions_headers_prompt_v2.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/transactions_prompt.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/sfn.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers.egg-info/SOURCES.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers.egg-info/dependency_links.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers.egg-info/requires.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers.egg-info/top_level.txt +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers.egg-info/zip-safe +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/setup.cfg +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/tests/test_cognito.py +0 -0
- {my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/tests/test_event.py +0 -0
|
@@ -17,6 +17,7 @@ class ContentType(str, Enum):
|
|
|
17
17
|
xml_content = "text/xml"
|
|
18
18
|
json_content = "application/json"
|
|
19
19
|
pdf_content = "application/pdf"
|
|
20
|
+
jpeg_content = "image/jpeg"
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
class ContentEncoding(str, Enum):
|
|
@@ -186,7 +187,7 @@ class S3:
|
|
|
186
187
|
logger.exception(f"Failed to save xml text to s3 due to {e}")
|
|
187
188
|
return None
|
|
188
189
|
|
|
189
|
-
def
|
|
190
|
+
def save_pdf_to_s3(self, pdf_content: bytes, s3_location: S3Location):
|
|
190
191
|
"""
|
|
191
192
|
pdf_content tends to come from:
|
|
192
193
|
PyMuPdf.Document().write()
|
|
@@ -217,3 +218,19 @@ class S3:
|
|
|
217
218
|
except Exception as e:
|
|
218
219
|
logger.exception(f"Failed to save dict to s3 due to {e}")
|
|
219
220
|
return None
|
|
221
|
+
|
|
222
|
+
def save_jpeg_to_s3(self, content: bytes, s3_location: S3Location):
|
|
223
|
+
try:
|
|
224
|
+
return self.save_document_content(
|
|
225
|
+
file_contents=content,
|
|
226
|
+
s3_location=s3_location,
|
|
227
|
+
content_type=ContentType.jpeg_content.value,
|
|
228
|
+
compress=True,
|
|
229
|
+
content_encoding=ContentEncoding.gzip.value,
|
|
230
|
+
)
|
|
231
|
+
except Exception as e:
|
|
232
|
+
logger.exception(f"Failed to save jpeg to s3 due to {e}")
|
|
233
|
+
return None
|
|
234
|
+
|
|
235
|
+
def read_dict_from_s3(self, s3_location: S3Location) -> dict:
|
|
236
|
+
return json.loads(self.read_binary_from_s3(s3_location=s3_location).decode("utf-8"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/markdown_system_prompt.txt
RENAMED
|
File without changes
|
{my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/transactions_headers_prompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
{my_aws_helpers-4.0.0 → my_aws_helpers-4.2.0}/my_aws_helpers/prompts/transactions_prompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|