The repository or configuration that created this release differ from a previous release. View details.
archivey
Python library for reading, streaming, and safely extracting archives (ZIP, TAR, RAR, 7z, ISO, and more) through a unified interface.
Features
- One interface for every format: ZIP, TAR (plain or compressed with gzip, bzip2, xz, zstd, lz4 or Unix compress), 7z, RAR, ISO 9660, plain directories, and single-file streams (gzip, bzip2, xz, lzip, LZMA, zstd, lz4, zlib, Brotli, Unix compress). List members, read one, or stream them all in one pass, the same way for each.
- Automatic format detection from the file's content, so a misnamed file still opens.
- Safe extraction by default: path traversal, symlink and hardlink escapes, special files and archive bombs are blocked unless you opt out.
- Resource limits on listing size, decoder memory, password key-derivation work and
temporary files, so a hostile archive fails with
ResourceLimitErrorinstead of exhausting the machine. - Verified reads: a member whose stored checksum fails raises
CorruptionError, and the bad chunk is withheld. Reading past a truncation raisesTruncatedError. Integrity errors come from reads, never fromclose(). - Built for streaming:
stream_members()hands out each member as a stream, in archive order and in one pass, so a solid 7z or RAR is decoded once and a large member is read in chunks rather than held in memory. TAR, ZIP and the single-file formats also read straight from a pipe. - Encrypted archives: ZipCrypto and WinZip AES in ZIP, AES in 7z, and RAR encryption.
- Native 7z and RAR metadata readers. 7z data decodes in-process; RAR data needs
RARLAB
unrarorrar, orunar. - Zero-dependency core for ZIP, TAR, 7z with the common codecs, RAR listing,
directories and the standard-library codecs,
plus an
archiveycommand for listing, testing and extracting from the shell. - Tested on Python 3.11 to 3.14 on Linux, and on 3.11 and 3.14 on macOS and Windows.
The API is not frozen until 1.0, but no large changes are expected. Until then, a removed or renamed name warns for one minor release before it goes (versioning and stability).
Install and use
pip install archivey # zero-dependency core
pip install "archivey[recommended]" # every format and codec that installs everywhere
import archivey
# Extract safely: traversal, link escapes and bombs are blocked by default.
with archivey.open_archive("untrusted.zip") as reader:
reader.extract_all("out/")
# List and read members, whatever the format.
with archivey.open_archive("photos.tar.gz") as reader:
for member, stream in reader.stream_members():
if member.is_file:
print(member.name, len(stream.read()))
Documentation
https://archivey-dev.github.io/archivey/
The cheat sheet has the main calls, their errors and the zipfile and tarfile equivalents on one page. Coding agents can read the docs as Markdown, starting from llms.txt, or all in one file from llms-full.txt.
Install · Opening an archive · Choosing how to read · Extracting · Security · Formats and extras · Migrating from other libraries · API reference
How it is built
Almost all of archivey's code, tests and documentation are written by AI coding agents (Claude Code and Cursor). The maintainer designs the library, makes the decisions, directs the work and reviews the code, especially the architecture and the tricky parts. Changes are tested on Linux, macOS and Windows and reviewed by a separate AI session that reads them from zero, and several reviews of the whole codebase hunt for bugs, unclear or dead code, and API problems. If you are wary of AI-written code, that is reasonable: How it is built says how changes are made and checked, and what the process does not promise.
Contributing and security
- CONTRIBUTING.md — coding / testing standards
- VISION.md — priorities and trade-offs; authoritative contracts live in
openspec/specs/ - SECURITY.md — private vulnerability reporting
- Issues — bug reports and feature requests, each with its own form
Metadata
Release files for archivey 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| archivey-0.2.1.tar.gz | 1.2 MB | With provenance | Details for archivey-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| archivey-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for archivey-0.2.1-py3-none-any.whl |
Total release size: 2.6 MB
Release files / archivey-0.2.1.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | archivey-0.2.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4b1e5515449222b49f1523c3266628acce274fc4537c5ce30522a7873e9e9e3
|
|
BLAKE2b-256 checksum How to use checksums |
35c72339f1e71b340a1699ea1384f5397ce4a3e55627724358b2c1358a8fbfbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / archivey-0.2.1-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | archivey-0.2.1-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2a3de5120507e468a1d6434074d52de07f67160b6125f7006e39e297e6118dd
|
|
BLAKE2b-256 checksum How to use checksums |
3e03fffd959b2fb408673e16e037300e3502b496cab8efdc1fced9889d13dd4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for archivey 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 0.2.0 github.com/davitf/archivey
- Added 0.2.1 github.com/archivey-dev/archivey
Attestation for archivey-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.