--- id: pyzipper version: "0.4.0" license: MIT license_treatment: permissive maintenance: active --- # pyzipper — AES encryption for zipfile. License: permissive · Maintenance: active · Downloads: 9.3M/mo ## What it is and what it does pyzipper is a drop-in replacement for Python's zipfile module that adds support for reading and writing AES-encrypted zip archives using the WinZip AES encryption specification. It maintains the same API as Python 3.7's zipfile, so existing code using standard zipfile can often switch to pyzipper with minimal changes to add encryption support. The package depends on pycryptodomex for cryptographic operations and supports AES encryption at 128, 192, or 256 bits (256 bits by default). It handles password-based encryption, CRC32 validation for data integrity, and follows WinZip's AES FAQ recommendations—notably, it excludes CRC32 values from encrypted file headers by default to avoid leaking information about small files, though this can be conditionally enabled for files above a configurable byte threshold. Use it for: - Encrypt sensitive files in zip archives for secure distribution or storage with password protection - Read WinZip-encrypted zip files programmatically without external tools or manual decryption - Build backup or archival systems that require both compression and AES encryption in a single step - Migrate from manual encryption workflows to a standard Python API for handling encrypted archives - Create password-protected zip files for compliance or data protection requirements ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyzipper replaces Python's standard zipfile module to read and write AES-encrypted zip archives, using the WinZip AES encryption specification. Yes. pyzipper is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real gap in Python's standard library—AES encryption for zip files. The MIT license is permissive. Use it when you need encrypted zip support; the API is familiar to anyone who has used zipfile, and the single dependency is lightweight. ## Install pip install pyzipper uv add pyzipper poetry add pyzipper ## Installing pyzipper Before you install: Low install friction; pure Python wheel with a single runtime dependency on pycryptodomex. Actively maintained with a release 92 days ago and ongoing commits. License in practice: MIT license permits commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install pyzipper import pyzipper secret_password = b'lost art of keeping a secret' with pyzipper.AESZipFile('new_test.zip', 'w', compression=pyzipper.ZIP_LZMA, encryption=pyzipper.WZ_AES) as zf: zf.setpassword(secret_password) zf.writestr('test.txt', 'secret content') with pyzipper.AESZipFile('new_test.zip') as zf: zf.setpassword(secret_password) content = zf.read('test.txt') Verify before relying: - Whether the API surface differs meaningfully from Python 3.7's zipfile beyond the documented lack of pathlib wrappers - Performance characteristics compared to standard zipfile for non-encrypted archives - Compatibility of encrypted archives with other AES zip implementations beyond WinZip ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 9.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags AES encrypted zip files, encrypted zipfile python, winzip AES encryption, password protected zip archives, cryptographic zip compression, secure zip file handling, zipfile with encryption, encryption, compression, archive [View on SkillFed](https://skillfed.io/packages/pyzipper) · [View on PyPI](https://pypi.org/project/pyzipper/)