patool
portable archive file manager
What it is and what it does
Patool is a portable archive manager that unifies the command-line interface for working with many archive formats. Instead of remembering separate tools and flags for 7z, ACE, ADF, ALZIP, APE, AR, ARC, ARJ, BZIP2, BZIP3, CAB, CHM, COMPRESS, CPIO, DEB, DMS, FLAC, FREEARC, GZIP, ISO, LRZIP, LZH, LZIP, LZMA, LZOP, RPM, RAR, RZIP, SHN, TAR, UDF, XZ, ZIP, ZOO, and ZSTANDARD, you use a single set of commands to extract, create, test, list, search, repack, and compare archives. It determines the archive format automatically using the file(1) program and falls back to file extension matching.
The package includes both a command-line tool and a Python API. Natively it supports TAR, ZIP, BZIP2, LZMA, and GZIP without external dependencies; other formats require their respective helper applications to be installed on the system. It has no Python runtime dependencies, making it lightweight to install, and is actively maintained with unit tests run on each code push.
Use it for:
- Extract multiple archives in different formats with a single command instead of switching between tools.
- Test archive integrity before deployment or distribution.
- Search for text patterns inside compressed archives without manually extracting them first.
- Convert or repack an archive from one format to another (e.g., tar.gz to tar.bz2).
- List files stored in an archive to inspect contents before extraction.
- Handle password-protected archives from the command line.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Patool is a command-line archive manager that can create, extract, test, list, search, repack, and compare archives in many formats with a unified interface.
Yes, if you work with multiple archive formats and want a unified interface. The package is stable, actively maintained, has no Python dependencies, and supports a wide range of formats. The main constraint is that less common formats require their helper applications to be installed separately. GPL-3 licensing is acceptable for most use cases but requires compliance if you redistribute or modify the code.
Install
patool on PyPI
pip
pip install patooluv
uv add patoolpoetry
poetry add patoolInstalling patool
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits and a stable release cycle. Requires Python 3.11 or later.
License in practice
Licensed under GPL-3 (copyleft). Any derivative work or distribution must comply with GPL v3 terms, including source code disclosure.
Quickstart
pip install patool
patool extract archive.zip
patool list package.tar.gz
patool test dist.tar.gz
Helper applications (xz, rar, 7z, etc.) must be installed on the system to handle their respective archive formats; TAR, ZIP, BZIP2, LZMA, and GZIP are supported natively.
Verify before relying
- Whether the package can reliably auto-detect archive format when file extension is ambiguous or missing.
- Performance characteristics when handling very large archives or deeply nested directory structures.
- Compatibility with password-protected archives across all supported formats.
Package facts
| License | GPL-3 (copyleft) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,374,430/month — #3,989 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: patool-4.0.5-py2.py3-none-any.whl
Keywords: archiver, archive, compression, commandline, manager
Tags
More Compression packages
Provides Python bindings to the Brotli…
permissive · top 1,000 on PyPI
backports.zstdProvides Zstandard compression support for…
permissive · top 1,000 on PyPI
zopfliZopfli is a Python binding for Google's Zopfli…
permissive · top 1,000 on PyPI
python-snappyPython binding for Google's Snappy compression…
permissive · top 5,000 on PyPI
pyzipperpyzipper replaces Python's standard zipfile…
permissive · top 5,000 on PyPI
pyzstdProvides Python bindings to the Zstandard…
permissive · top 5,000 on PyPI
pyunpackUnpacks archive files in Python with support…
permissive · top 15,000 on PyPI
zip-filesProvides command-line tools to create zip files…
permissive · top 15,000 on PyPI
extractcodeExtracts a wide range of archive formats (tar,…
permissive · top 15,000 on PyPI
tzsttzst creates and extracts tar archives…
permissive · top 15,000 on PyPI
handy-archivesProvides utility functions for working with…
permissive · top 15,000 on PyPI
fastarFastar provides high-performance tar archive…
permissive · top 1,000 on PyPI
arParses and reads ar archive files (.a),…
permissive · top 15,000 on PyPI
fastdownloadDownloads, verifies, and extracts archives from…
permissive · top 15,000 on PyPI
libarchive-clibarchive-c provides a Python interface to…
permissive · top 15,000 on PyPI
py7zrpy7zr is a pure-Python library for reading,…
copyleft · top 5,000 on PyPI