my-aws-helpers 1.3.0__tar.gz → 1.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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: my_aws_helpers
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: AWS Helpers
5
5
  Home-page: https://github.com/JarrodMccarthy/aws_helpers.git
6
6
  Author: Jarrod McCarthy
@@ -10,9 +10,26 @@ class API:
10
10
  "body": body,
11
11
  }
12
12
 
13
+ def get_optional_query_string_param(event: dict, param: str) -> Optional[Any]:
14
+ query_string_params = event.get("queryStringParameters")
15
+ if query_string_params is None:
16
+ return None
17
+ else:
18
+ return query_string_params.get(param)
19
+
20
+
21
+ def get_optional_body_param(event: dict, param: str):
22
+ body = event.get("body")
23
+ if body is None:
24
+ return None
25
+ else:
26
+ body = json.loads(body)
27
+ param_value = body.get(param)
28
+ return param_value
29
+
13
30
  def parse_payload(event: Dict[str, Any]):
14
31
  payload = {}
15
- if event.get("queryParameters"): payload["queryParameters"] = event["queryParameters"]
32
+ if event.get("queryStringParameters"): payload["queryStringParameters"] = event["queryStringParameters"]
16
33
  if event.get("pathParameters"): payload["pathParameters"] = event["pathParameters"]
17
34
  if event.get("body"): payload["body"] = json.loads(event["body"])
18
35
  return payload
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: my_aws_helpers
3
- Version: 1.3.0
3
+ Version: 1.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 = "1.3.0"
6
+ version = "1.4.0"
7
7
 
8
8
  setup(
9
9
  name="my_aws_helpers",
File without changes
File without changes