Forum Archive

Make password protected zip file

mncfre

Hi, I'm trying to create a password-protected zip file but the python zipfile library only extracts files with password, you can not create one, any options?

ccc

Perhaps zipfile.ZipFile.setpassword()

omz

setpassword() only works for extracting password-protected zip files. The only option I've found for creating them is pyminizip, but that has C dependencies, so it's currently not possible to use it in Pythonista.

mncfre

Hi Ole, I saw pyminizip Included in the V3.0.1, so it's going to be possible the creation of a password protected zip? it would be great, I'm going to try it.

omz

@mncfre Yes, it should be possible to create password-protected Zip files using pyminizip in the current beta (I added it because of this thread).

mncfre

Thanks a lot for your help, excellent feature, it going to help me a lot allowing me to encrypt my passwords files.