zf = zipfile.ZipFile(archive_name)
for zinfo in zf.infolist():
    is_encrypted = zinfo.flag_bits & 1
if is_encrypted:
    pass
How to check if a zip file is encrypted using python's standard library zipfile?