Skip to content

feat(data-classes): Add appsync scalar_types_utils and add support for timezone offsets#339

Merged
heitorlessa merged 1 commit into
aws-powertools:developfrom
gyft:feat-appsync-scalar-utils
Mar 15, 2021
Merged

feat(data-classes): Add appsync scalar_types_utils and add support for timezone offsets#339
heitorlessa merged 1 commit into
aws-powertools:developfrom
gyft:feat-appsync-scalar-utils

Conversation

@michaelbrewer

@michaelbrewer michaelbrewer commented Mar 13, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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