pygrestqlambda 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl

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.
@@ -2,9 +2,9 @@
2
2
  JSON output transformer for non-serialisable values
3
3
  """
4
4
 
5
+ from datetime import date, datetime
6
+ from decimal import Decimal
5
7
  from uuid import UUID
6
- from datetime import datetime
7
-
8
8
 
9
9
  def json_output(value: object) -> str:
10
10
  """
@@ -15,8 +15,15 @@ def json_output(value: object) -> str:
15
15
  if isinstance(value, UUID):
16
16
  value = str(value)
17
17
 
18
- # Handle timestamps
18
+ # Handle date/timestamps
19
19
  if isinstance(value, datetime):
20
20
  value = value.isoformat()
21
21
 
22
+ if isinstance(value, date):
23
+ value = value.isoformat()
24
+
25
+ # Handle decimals
26
+ if isinstance(value, Decimal):
27
+ value = float(value)
28
+
22
29
  return value
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygrestqlambda
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: PostgreSQL REST API framework for AWS Lambda functions
5
5
  Project-URL: Homepage, https://github.com/mesogate/pygrestqlambda
6
6
  Project-URL: Issues, https://github.com/mesogate/pygrestqlambda/issues
@@ -1,11 +1,11 @@
1
1
  pygrestqlambda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  pygrestqlambda/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  pygrestqlambda/aws/lambda_function/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- pygrestqlambda/aws/lambda_function/json_transform.py,sha256=u4b6PCp5TRWTUU8ofM0iO6Wz8eJN_5yipPQFINNeqjE,442
4
+ pygrestqlambda/aws/lambda_function/json_transform.py,sha256=SlUnG23gzy_zHpVP-thRYaWc91w6OFisTGrxKah6UL4,634
5
5
  pygrestqlambda/aws/lambda_function/rest_api_gateway_proxy_integration.py,sha256=TDn9D_BivcTPoNK1PhgymnF0V8blWaEE0cYV9v3aCLQ,1699
6
6
  pygrestqlambda/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  pygrestqlambda/db/record.py,sha256=6HwvVIB8iJxxcoLeFgk51Gik_w7--w5fQzLN0ntB8iw,1527
8
- pygrestqlambda-0.0.2.dist-info/METADATA,sha256=k6CJuCpaAE__9z_Ir2iDA8e-H6C07jr2u9vPMKfkk-s,1294
9
- pygrestqlambda-0.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- pygrestqlambda-0.0.2.dist-info/licenses/LICENSE,sha256=8QeS1c5uv4AYoEG3M80OSCBuC_Pk-6vjU1VBUnlX2m0,1071
11
- pygrestqlambda-0.0.2.dist-info/RECORD,,
8
+ pygrestqlambda-0.0.3.dist-info/METADATA,sha256=yshe1yJ4gp-ndptTYh93fEIGhWxabm9aWycVLBfkgfI,1294
9
+ pygrestqlambda-0.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ pygrestqlambda-0.0.3.dist-info/licenses/LICENSE,sha256=8QeS1c5uv4AYoEG3M80OSCBuC_Pk-6vjU1VBUnlX2m0,1071
11
+ pygrestqlambda-0.0.3.dist-info/RECORD,,