--- id: extractcode version: "31.1.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # extractcode — A mostly universal archive extractor using 7zip, libarchive and the Python standard library for reliable archive extraction. License: permissive · Maintenance: active · Downloads: 123.9K/mo ## What it is and what it does ExtractCode is a universal archive extractor that handles a large number of formats—including tar, zip, 7z, rpm, deb, iso, vmdk, qcow2, and compressed variants—with built-in resilience for edge cases that cause other extractors to fail. It uses a voting system based on file extension, mimetype, and content to select the best extraction method, and can recursively extract nested archives. Behind the scenes it combines the Python standard library, a ctypes binding to libarchive, and the 7zip command-line tool to achieve broad format support. The package is designed primarily for software composition analysis and forensic file inspection rather than preserving exact filesystem semantics. It will auto-rename files with invalid names on certain filesystems, handle multiple copies of the same path in a tar archive, extract from damaged archives when possible, fix permission issues, and skip special files and symlinks. On Linux, it can also extract VM images via libguestfs. Installation can be minimal (relying on system tools) or full (bundling binaries), and configuration is done via environment variables or plugins. Use it for: - Extract Linux kernel tarballs on Windows without path case-sensitivity or collision errors. - Recover files from partially damaged or corrupted archives when standard tools fail. - Recursively extract nested archives (tar.gz inside zip inside tar) in a single operation. - Analyze software packages (rpm, deb, iso) as part of a supply-chain or forensic workflow. - Extract VM disk images (vmdk, qcow2, vhd) on Linux with libguestfs support. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extracts a wide range of archive formats (tar, zip, 7z, rpm, deb, iso, vmdk, qcow2, and many others) with fallback strategies to handle damaged archives, case-sensitivity issues, duplicate paths, and permission problems that would cause other extractors to fail. Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—extracting archives that fail with standard tools. The Apache-2.0 license is permissive. Install it if you need robust, cross-platform archive extraction with fallback strategies for edge cases; skip it if you only handle simple, well-formed archives with standard tools. ## Install pip install extractcode uv add extractcode poetry add extractcode ## Installing extractcode Before you install: Low friction install with a pure-Python wheel. Marked as active with recent commits. The package offers two installation modes: `pip install extractcode[full]` bundles 7zip and libarchive binaries; `pip install extractcode` expects system-provided tools or plugin-supplied paths via environment variables. License in practice: Apache-2.0 is permissive and imposes no restrictions on use or redistribution in closed-source projects. You may use this package freely in commercial or proprietary work. Quickstart: pip install extractcode[full] from extractcode import extract extract.extract('/path/to/archive.tar.gz', '/output/directory') Requires Python >=3.10. The `[full]` extra installs bundled 7zip and libarchive; without it, you must provide libarchive 3.5.x and 7zip 16.5.x via system PATH, environment variables (EXTRACTCODE_LIBARCHIVE_PATH, EXTRACTCODE_7Z_PATH), or plugins. Verify before relying: - Whether the package's recursive archive-in-archives extraction works with all supported formats or has known limitations. - Performance characteristics when extracting very large archives or deeply nested structures. - Exact behavior of file renaming and permission changes during extraction in edge cases. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 123.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags archive extraction library, universal archive extractor, extract tar zip 7z, libarchive python wrapper, handle damaged archives, recursive archive extraction, cross-platform file extraction, archive-extraction, forensics, cross-platform [View on SkillFed](https://skillfed.io/packages/extractcode) · [View on PyPI](https://pypi.org/project/extractcode/)