skillfed

pyzipper

AES encryption for zipfile.

pyzipper v0.4.0 9.3M downloads/30d#1,544 on PyPI145
Permissive license MIT Active released

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 on this page — 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

pyzipper on PyPI

pip

pip install pyzipper

uv

uv add pyzipper

poetry

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 the current Python release (>=3.4)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pycryptodomex
Maintenance actively maintained — 92 days since the last release
Last repo commit
First released
Downloads 9,323,147/month — #1,544 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyzipper-0.4.0-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Archiving :: Compression

Tags

AES encrypted zip filesencrypted zipfile pythonwinzip AES encryptionpassword protected zip archivescryptographic zip compressionsecure zip file handlingzipfile with encryption
encryptioncompressionarchive

More Compression packages