def to_payload(self, source, data, **options): #write data to options['archive'] adaptor = get_adaptor(options['format']) encoded_data = adaptor.serialize(data) options['archive'].writestr(options['filename'], encoded_data) return {'source':source, 'filename':options['filename'], 'format':options['format']}
def get_data(self): response = urlopen(self.url) adaptor = get_adaptor(self.options['format']) data = adaptor.deserialize(response) return data
def get_data(self): path = self.get_file_path() source = self.archive.open(path) adaptor = get_adaptor(self.options['format']) data = adaptor.deserialize(source) return data