class ErrorNotification(object):
    def __init__(self, error_mapping):
        self.raw = error_mapping
        self.error = error_mapping['error']
        self.text = error_mapping['text']

class ErrorNotification(object):
    def __init__(self, error, text):
        self.error = error
        self.text = text

    @classmethod
    def from_mapping(cls, error_mapping):
        return cls(error=error_mapping['error'],
                   text=error_mapping['text'])

Add from_mapping() to ErrorNofitication