Python library for reading zip, tar, rar, 7z and other archives
Project description
Archivey
Archivey is a Python library that provides a unified interface for reading several archive and compression formats, wrapping built-in Python modules and optional external packages.
👉 Full documentation is published here.
Quick start
Install with third-party libraries:
pip install archivey[optional]
Or manage dependencies yourself for only the formats you need. RAR support requires unrar to be installed separately.
Usage example
from archivey import open_archive
with open_archive("example.zip") as archive:
# Extract all files
archive.extractall("output_dir/")
# Or process each file inside the archive
for member, stream in archive.iter_members_with_io():
print(member.filename, member.type, member.file_size)
if stream is not None: # skip directories and links
data = stream.read()
print(" ", data[:50])
See more details in the User guide.
Why use this?
- Automatic archive format detection
- Consistent interface across multiple archive types
- Optimized for random access and streaming
- Sensible, secure defaults for file extraction
Resources
- User guide
- API Reference
- GitHub repository (or the development repository with messier commits and AI-generated pull requests)
- Developer guide, if you'd like to contribute
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file archivey-0.0.1a1.tar.gz.
File metadata
- Download URL: archivey-0.0.1a1.tar.gz
- Upload date:
- Size: 14.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a813de9fecff721c0a50653b6b43faeefa06fae76a5d45eabb79d4c4e7aa7d5e
|
|
| MD5 |
8444cdbdaa8bed2f9107c7122f523706
|
|
| BLAKE2b-256 |
53f9a8e21a20a93c875b63b7da207e502683bddb1fd35ac8dda78dc38031b721
|
Provenance
The following attestation bundles were made for archivey-0.0.1a1.tar.gz:
Publisher:
deploy-pypi.yml on davitf/archivey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archivey-0.0.1a1.tar.gz -
Subject digest:
a813de9fecff721c0a50653b6b43faeefa06fae76a5d45eabb79d4c4e7aa7d5e - Sigstore transparency entry: 276946892
- Sigstore integration time:
-
Permalink:
davitf/archivey@084324c4294581ef21c5be519d206694c4c7e8c3 -
Branch / Tag:
refs/tags/v0.1.0-a1 - Owner: https://github.com/davitf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-pypi.yml@084324c4294581ef21c5be519d206694c4c7e8c3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file archivey-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: archivey-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 77.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec52cc947d204f7d14c5bb5220fd191080c51f273088a556a8c40e930a63054c
|
|
| MD5 |
567e92c7089d1813f11f4c38240e0779
|
|
| BLAKE2b-256 |
0675a95e9cce7b53bda5a63185a0654aa700413d4bf4a4dbabf29a7127591718
|
Provenance
The following attestation bundles were made for archivey-0.0.1a1-py3-none-any.whl:
Publisher:
deploy-pypi.yml on davitf/archivey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archivey-0.0.1a1-py3-none-any.whl -
Subject digest:
ec52cc947d204f7d14c5bb5220fd191080c51f273088a556a8c40e930a63054c - Sigstore transparency entry: 276946901
- Sigstore integration time:
-
Permalink:
davitf/archivey@084324c4294581ef21c5be519d206694c4c7e8c3 -
Branch / Tag:
refs/tags/v0.1.0-a1 - Owner: https://github.com/davitf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-pypi.yml@084324c4294581ef21c5be519d206694c4c7e8c3 -
Trigger Event:
push
-
Statement type: