Registry / devops / extractcode

extractcode

JSON →
library31.1.0pypypi✓ verified 85d ago

A mostly universal archive extractor using 7zip, libarchive and the Python standard library for reliable archive extraction. Current version 31.0.0, requires Python >=3.6. Released as part of the scancode-toolkit ecosystem.

pip install extractcode
INSTALL
IMPORT
SIG · EXTRACTCODE
E
extractcode
devopspythonv31.1.0
Install
5.1s avg
Import
403ms
Disk
62MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v31.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.408s · 63MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 5.1s · import 0.397s · 65MB
62MB installed
● package 62MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extract_archive
from extractcode.api import extract_archive
from extractcode import extract_archive
extract_archive is in the api submodule, not top-level.

Basic usage: extract an archive file to a directory.

from extractcode.api import extract_archive # Extract an archive to a destination directory extract_archive('sample.zip', dest_dir='/tmp/extracted', verbose=True)
extractcode --version
Debug
Known issues
breakingIn v31.0.0, patch extraction is no longer installed by default. Use the [patch] extra to include patch.py support.
fix
pip install extractcode[patch]
affects: >=31.0.0
gotchaThe main extraction function `extract_archive` is located in the `extractcode.api` module, not in the top-level `extractcode` package. Importing from the top level will raise ImportError.
fix
Use `from extractcode.api import extract_archive`.
affects: all
deprecatedOlder versions used `extractcode.extract()` or similar functions that are now removed. Check the API for the current interface.
fix
Upgrade to v31.0.0 and use `from extractcode.api import extract_archive`.
affects: <31.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'extractcode.api'
Installed an older version (<31.0.0) where the API module did not exist or was named differently.
fix
Upgrade to the latest version: pip install --upgrade extractcode
ImportError: cannot import name 'extract_archive' from 'extractcode'
Attempting to import directly from the top-level package instead of the api submodule.
fix
from extractcode.api import extract_archive
AttributeError: module 'extractcode' has no attribute 'extract'
Using an old API (e.g., `extractcode.extract()`) that was removed in recent versions.
fix
Use from extractcode.api import extract_archive and call extract_archive().
Upgrade
Version history
31.1.0latest on PyPI · released May 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
extractcode — pip install extractcode · libregistry