Skip to content

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Mar 13, 2021

Issue #, if available:
#324

Description of changes:

Add support for Scalar types in AWS AppSync

  • Move existing scalar util functions in to scalar_types_utils.py
  • Add support for timezone offset
  • Add docstrings for scalar utils
  • Update tests

Example usage:

>>> from aws_lambda_powertools.utilities.data_classes.appsync import scalar_types_utils
>>>
>>> scalar_types_utils.make_id()
'1e090fce-3798-40eb-b752-3664a39b0f34'
>>> scalar_types_utils.aws_date(timezone_offset=2)
'2021-03-14+02:00:00'
>>> scalar_types_utils.aws_time(timezone_offset=-1)
'23:33:58-01:00:00'

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Changes:
- Move existing scalar util functions in to scalar_types_utils.py
- Add support for timezone offset
- Add docstrings for scalar utils
- Update tests

Closes #324
@michaelbrewer
Copy link
Contributor Author

@heitorlessa i moved the scalar related utils into scalar_types_utils.py and added support for timezone offsets :)

@heitorlessa heitorlessa added area/utilities feature New feature or functionality labels Mar 15, 2021
@heitorlessa heitorlessa added this to the 1.12.0 milestone Mar 15, 2021
@heitorlessa
Copy link
Contributor

Timezone offset is a nice touch - Thanks a lot for working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants