Python 3 Compression Script to Create a Password Protected ZIP File Using pyminizip Module Full Project For Beginners

 

 

In order to get started you need to install the below library using the pip command as shown below

 

 

pip install pyminizip

 

 

After installing this library you need to make an app.py file and copy paste the following code

 

 

app.py

 

 

# importing module
import pyminizip

# input file path
inpt = "./Text.txt"

# prefix path
pre = None

# output zip file path
oupt = "./output.zip"

# set password value
password = "GFG"

# compress level
com_lvl = 5

# compressing file
pyminizip.compress(inpt, None, oupt,
                password, com_lvl)

Leave a Reply