Skip to main content

A module for extracting archive files, which wraps the patoolib library, can recursively process nested compressed package files.

Project description

ArchExtractor

A module for extracting archive files, which wraps the patoolib library, can recursively process nested compressed package files.

Installation

  • On Ubuntu
# Install the necessary decompression backend
>>> sudo apt-get install unzip unrar p7zip-full

# Install using pip
>>> python3 -m pip install archextractor

# or uv
>>> uv add archextractor
  • On MacOS
# Install the necessary decompression backend
>>> brew install 7zip rar

# Install using pip
>>> python3 -m pip install archextractor

# or uv
>>> uv add archextractor

Usage

from archextractor import ArchExtractor

# Initialize one reusable extractor
extractor = ArchExtractor()

# Extract all the archive files in the source path, including the nested archive files
extractor.extractall(
    src="/data/archive.tar",  # The source path of the archive file (only file path, not directory path)
    dst="/data/unpacked",  # The destination path of the extracted files (only directory path, not file path)
    mode="e",   # The mode of the extraction. If set to "e", the extracted files will be moved to the top level directory. If set to "x", the extracted files will be kept in the original directory structure
    verbosity=-1,  # Larger values print more information. 0 is the default, -1 or lower means no output, values >= 1 prints command output
    cleanup=True,  # The source archive file will be deleted after extraction
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archextractor-0.2.1.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archextractor-0.2.1-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file archextractor-0.2.1.tar.gz.

File metadata

  • Download URL: archextractor-0.2.1.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for archextractor-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3e6b8e4ab890a53e1b6ade48fb0149017e09e1042bc540aa52c39b78440e8e2c
MD5 cc88eb8ffb916688267fc9ba0c73d27a
BLAKE2b-256 170dfc15737ad06c7cbfa1948c773fa30f5929de5162ba5bc747071b62f527e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.2.1.tar.gz:

Publisher: python-publish.yml on 2513502304/ArchExtractor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file archextractor-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: archextractor-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for archextractor-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1bbb0267d72d22e7110879709393791d2e83cf936d03881ec438dd4b2923d14
MD5 ecc9db3c93efb0650321309f1afb6640
BLAKE2b-256 5445ee183ad4d89666dbb690466355283ec07d15e53956a2217aaf363147ddf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.2.1-py3-none-any.whl:

Publisher: python-publish.yml on 2513502304/ArchExtractor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page