Skip to content

Very minor question about tags. #569

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

Closed
ryanpeach opened this issue Dec 20, 2018 · 2 comments · Fixed by #4327
Closed

Very minor question about tags. #569

ryanpeach opened this issue Dec 20, 2018 · 2 comments · Fixed by #4327

Comments

@ryanpeach
Copy link

I've seen this in a lot of aws documentation, and maybe you just want compatibility or something, but I'd just like to ask.

Why do we tag this way:

tags=[{'Key': 'example', 'Value': 'True'}, ...]

Instead of the much more pythonic and intuitive:

tags={'example': 'True'}

These could easily be supported with the following transformation:

if isinstance(tags, dict):
    tags=[{'Key': str(k), 'Value': str(v)} for k, v in tags.items()]

Sorry if this has been brought up before, feel free to close.

@laurenyu
Copy link
Contributor

hi @ryanpeach, good question! I think the original reason was to match how tags are defined with the regular AWS SDK, but you raise a good point about there being a more Pythonic way to do it in this SDK. It might be a little trickier to implement now while preserving backward-compatibility, but certainly not impossible.

I'll leave this open as a feature request; we're always reprioritizing our backlog based on customer feedback. Thanks!

@ryanpeach
Copy link
Author

The example code I wrote should maintain backwards compatibility. Thanks!

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

Successfully merging a pull request may close this issue.

4 participants