def upload_files(self): files = os.listdir(self.input_file) with progressbar.ProgressBar(max_value=len(files)) as bar: for indice, file in enumerate(files): pathFile = self.input_file+file keyFile = self.output + file self._S3.meta.client.upload_file(pathFile, self.bucket, keyFile) bar.update(indice+1)