my-aws-helpers 4.2.0__tar.gz → 4.4.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.

Files changed (28) hide show
  1. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/PKG-INFO +1 -1
  2. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/s3.py +17 -0
  3. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers.egg-info/PKG-INFO +1 -1
  4. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/setup.py +1 -1
  5. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/MANIFEST.in +0 -0
  6. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/README.md +0 -0
  7. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/api.py +0 -0
  8. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/auth.py +0 -0
  9. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/bedrock.py +0 -0
  10. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/cognito.py +0 -0
  11. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/dynamo.py +0 -0
  12. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/errors.py +0 -0
  13. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/event.py +0 -0
  14. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/logging.py +0 -0
  15. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/prompts/__init__.py +0 -0
  16. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/prompts/markdown_system_prompt.txt +0 -0
  17. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/prompts/transactions_headers_prompt.txt +0 -0
  18. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/prompts/transactions_headers_prompt_v2.txt +0 -0
  19. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/prompts/transactions_prompt.txt +0 -0
  20. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers/sfn.py +0 -0
  21. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers.egg-info/SOURCES.txt +0 -0
  22. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers.egg-info/dependency_links.txt +0 -0
  23. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers.egg-info/requires.txt +0 -0
  24. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers.egg-info/top_level.txt +0 -0
  25. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/my_aws_helpers.egg-info/zip-safe +0 -0
  26. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/setup.cfg +0 -0
  27. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/tests/test_cognito.py +0 -0
  28. {my_aws_helpers-4.2.0 → my_aws_helpers-4.4.0}/tests/test_event.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: my_aws_helpers
3
- Version: 4.2.0
3
+ Version: 4.4.0
4
4
  Summary: AWS Helpers
5
5
  Home-page: https://github.com/JarrodMccarthy/aws_helpers.git
6
6
  Author: Jarrod McCarthy
@@ -2,6 +2,7 @@ import boto3
2
2
  import io
3
3
  import json
4
4
  from typing import Optional, Any, Dict
5
+ from datetime import datetime, date
5
6
  from copy import copy
6
7
  import os
7
8
  import gzip
@@ -24,6 +25,22 @@ class ContentEncoding(str, Enum):
24
25
  gzip = "gzip"
25
26
 
26
27
 
28
+ class S3Serialiser:
29
+
30
+ @staticmethod
31
+ def _serialise(obj: Any):
32
+ if isinstance(obj, datetime) or isinstance(obj, date):
33
+ return obj.isoformat()
34
+ return obj
35
+
36
+ @staticmethod
37
+ def object_serialiser(obj: Any):
38
+ if isinstance(obj, list):
39
+ return json.dumps([S3Serialiser.object_serialiser(obj=obj) for obj in obj])
40
+ if isinstance(obj, dict):
41
+ return json.dumps({k: S3Serialiser.object_serialiser(v) for k, v in obj.items()})
42
+ return S3Serialiser._serialise(obj=obj)
43
+
27
44
  class S3Location:
28
45
  bucket: str
29
46
  file_name: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: my-aws-helpers
3
- Version: 4.2.0
3
+ Version: 4.4.0
4
4
  Summary: AWS Helpers
5
5
  Home-page: https://github.com/JarrodMccarthy/aws_helpers.git
6
6
  Author: Jarrod McCarthy
@@ -3,7 +3,7 @@ from setuptools import find_namespace_packages, setup
3
3
 
4
4
  base_path = os.path.abspath(os.path.dirname(__file__))
5
5
 
6
- version = "4.2.0"
6
+ version = "4.4.0"
7
7
 
8
8
  core = [
9
9
  "boto3==1.34.36",
File without changes
File without changes