stormpath/stormpath-sdk-python — pull request #51 by senko (2014-05-12 11:31:54+00:00)
Title: Dict resources

An attempt to fix https://github.com/stormpath/stormpath-sdk-python/issues/48

This is not a complete implementation - notably missing is a convenient way to update the resource in the same way as dictionaries can be updated. For example, something like:

account.update({'given_name': 'John', 'surname': 'Smith'})

The question here is whether this would immediately save the changes back to the server, or only perform local attribute modifications (and the user would need to do `account.save()` later on). The latter is what Python's `dict` does (and may make sense if the user wants to do additional modifications), but the verb `update` suggests the account update is immediately saved, as well, ie. this looks strange IMO:

account.update(...)
account.save()

I'm slightly leaning toward update immediately being sent to the server.