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 the ArchExtractor class, set the source and destination paths
extractor = ArchExtractor(
    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)
)

# Extract all the archive files in the source path, including the nested archive files
extractor.extractall(
    verbosity=-1,  # See patoolib.extract_archive for more details
    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.1.1.tar.gz (28.6 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.1.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for archextractor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c00a265a18ada9583c7ee9c36c2a48a8dbaa6a024842faa5681c319fe48e3862
MD5 eb1534e39aaa98d2b4d217fde2ac3273
BLAKE2b-256 cecb5670a10c7dd46c1dd236101402568df02348bfb49c5ee01efc1adc30d43a

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.1.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.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for archextractor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abca582c4ed0501af1474dae9d189fa2b6e181335c94466cce57098219fdb171
MD5 f9ec3c0b43031eb06ae9cb8c4c696588
BLAKE2b-256 40ed3623498e05f0628bfd6721b6b27e4c9c074f4b4ba91bb3b637857683786c

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.1.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