skillfed

patool

portable archive file manager

patool v4.0.5 1.4M downloads/30d#3,989 on PyPI456
Copyleft license GPL-3 Active released

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 patool

uv

uv add patool

poetry

poetry add patool

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: System :: Archiving :: Compression

Tags

archive manager command lineextract multiple archive formatsunified archive tooltar zip rar extractionarchive compression utilitybatch archive operationscross-format archive handling
archive-managementcommand-line-toolcompression

More Compression packages