Added function to rebuild Resource from a dictionary

This commit is contained in:
2015-11-04 12:54:55 +01:00
parent 84e94a29c1
commit 227d13c45f

View File

@@ -98,6 +98,11 @@ class Resource(object):
data[key] = parse_object(self.__data__[key])
return data
def from_dict(self, d):
for key, val in d.iteritems():
self[key] = val
return self
class Find(Resource):