initialize variable from loaded data

def initialize(self, data):
        """ initialize variable from loaded data """
        for item in data:
            if hasattr(self, item):
                setattr(self, item, data[item])