Skip to content

davitf/archivey

Repository files navigation

Archivey

Archivey is a Python library that provides a unified interface for reading various archive formats:

from archivey import open_archive

with open_archive("example.zip") as archive:  # Automatic format detection
    # Extract all files
    archive.extractall("output_dir/")

    # Or process each file in the archive
    for member, stream in archive.iter_members_with_streams():
        print(member.filename, member.type, member.file_size)
        if stream is not None:  # File-like stream for files, None for dirs and links
            data = stream.read()
            print("  ", data[:50])

It wraps built-in modules and optional third-party libraries, adding missing features and fixing limitations in the underlying tools. See the User guide for more details.

Installation

pip install archivey[optional]

The [optional] extra includes all recommended third-party libraries for full format support.

Note: RAR support requires the unrar binary to be available on your system or installed separately.

Resources

About

Python library for reading zip, tar, rar, 7z and other archives

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages