Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Mar 15, 2021

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 michaelbrewer changed the title feat(data-classes): Add appsync scalar_types_utils feat(data-classes): Add appsync scalar_types_utils and add support for timezone offsets Mar 13, 2021
@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.

None yet

2 participants