I have to read the zip,rar and 7z file present in the server and extract there itself for further processing. I am using paramiko and python. I have a sftp file but I am not able to pass it through Patool library.
remote_file = sftp_client.open(output[i],'rb')
sftp = ssh_client.open_sftp()
file = ftp.file(output[i], "r", -1)
lines = file.readlines()
print(lines)
patoolib.extract_archive(output[i], outdir=inputPath)
Here output[i]
is remote server zip file path.