my-aws-helpers 2.5.0__tar.gz → 2.6.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 (20) hide show
  1. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/PKG-INFO +1 -1
  2. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/api.py +16 -0
  3. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers.egg-info/PKG-INFO +1 -1
  4. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/setup.py +1 -1
  5. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/README.md +0 -0
  6. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/auth.py +0 -0
  7. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/cognito.py +0 -0
  8. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/dynamo.py +0 -0
  9. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/errors.py +0 -0
  10. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/event.py +0 -0
  11. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/logging.py +0 -0
  12. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/s3.py +0 -0
  13. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers/sfn.py +0 -0
  14. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers.egg-info/SOURCES.txt +0 -0
  15. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers.egg-info/dependency_links.txt +0 -0
  16. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers.egg-info/requires.txt +0 -0
  17. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers.egg-info/top_level.txt +0 -0
  18. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/my_aws_helpers.egg-info/zip-safe +0 -0
  19. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.0}/setup.cfg +0 -0
  20. {my_aws_helpers-2.5.0 → my_aws_helpers-2.6.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: 2.5.0
3
+ Version: 2.6.0
4
4
  Summary: AWS Helpers
5
5
  Home-page: https://github.com/JarrodMccarthy/aws_helpers.git
6
6
  Author: Jarrod McCarthy
@@ -1,9 +1,25 @@
1
1
  from typing import Optional, Dict, Any
2
+ from datetime import datetime, date
2
3
  import json
3
4
  from my_aws_helpers.errors import *
4
5
 
5
6
 
6
7
  class API:
8
+
9
+ def _serialise(obj):
10
+ if isinstance(obj, datetime) or isinstance(obj, date):
11
+ return obj.isoformat()
12
+ return obj
13
+
14
+ def response_serialiser(response: Any):
15
+ if isinstance(response, list):
16
+ return [API.response_serialiser(obj) for obj in response]
17
+ if isinstance(response, dict):
18
+ for k, v in response.items():
19
+ response[k] = API.response_serialiser(v)
20
+ return response
21
+ return API._serialise(response)
22
+
7
23
  def response(code: int, body: Optional[str] = None):
8
24
  return {
9
25
  "statusCode": code,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: my-aws-helpers
3
- Version: 2.5.0
3
+ Version: 2.6.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 = "2.5.0"
6
+ version = "2.6.0"
7
7
 
8
8
  setup(
9
9
  name="my_aws_helpers",
File without changes
File without changes