Skip to main content

deepfetch

deepfetch reads single files out of large archives (zip, 7z, tar, gzip) and forensic disk images (E01, Ex01, VHD, VHDX, VMDK, raw; NTFS, ext, FAT, exFAT) in S3 or S3-compatible storage, without downloading them. One caller scans an object into a manifest of member pointers, with each file's metadata. Other callers fetch any one file from its pointer alone, usually with one ranged GET.

Python 3.11+. Depends on msgspec, isal and obstore. MIT license. Extras: deepfetch[aes] (encrypted zip and 7z), deepfetch[brotli], deepfetch[deflate64] (through LGPL inflate64) and deepfetch[zstd] (Zstandard below Python 3.14).

Install

pip install "deepfetch[aes,brotli,deflate64,zstd] @ git+<repository URL>@<branch or tag>"

The extras add encrypted Archives, Brotli, Deflate64 and Zstandard; the guide says when each is needed.

Use

import deepfetch

async with deepfetch.Client() as client:            # S3, from the AWS_* environment variables
    scan = await client.scan("evidence", "mail-export.zip")
    async for record in scan:
        if record.kind == "file":
            queue.send(record.path, str(scan.pointer(record)), record.meta())   # "dfp1.…"

# in a worker
async with deepfetch.Client() as client:
    data = await client.fetch(pointer)              # decoded, size and CRC checked

An Image (E01, Ex01, raw) lists its partitions, and client.scan_member(pointer) lists the files of one. To list everything at every depth (partitions, Filesystems, archives inside archives) in one loop:

async for path, record, pointer in client.walk("evidence", "laptop.E01"):
    print(path, record.kind, record.size)

record.meta() is the file's metadata as the format stored it: every timestamp at its stored precision and zone, owner, mode and attributes. Sync code, such as dramatiq workers, uses deepfetch.SyncClient, one per process.

The guide covers the rest: fanning out across workers, Manifests, Images and their stored hashes, passwords, MinIO and other storage, the metadata fields of each format, which errors to retry, cost and tuning, and what stays compatible across releases. examples/worker-pipeline is a complete pipeline on dramatiq, RabbitMQ, MinIO and Mongo.

CLI

deepfetch ls s3://bucket/disk.E01 [--flat]
deepfetch manifest s3://bucket/dump.zip -o dump.jsonl
deepfetch manifest pointers dump.jsonl
deepfetch fetch dfp1.… -o out.bin [--first N] [--raw]
deepfetch pointer decode dfp1.…
deepfetch pointer key dfp1.…
deepfetch check-store s3://bucket/prefix

ls prints every file at every depth, tab-separated: path, kind, size and pointer. --local ROOT reads ROOT/bucket/key from disk. check-store runs every storage call deepfetch depends on against an endpoint and prints pass or fail for each.

What it reads

  • Zip, including Zip64, data descriptors, bytes in front of the zip, CP437, UTF-8 and Unicode Path names, duplicate names, directories and symlinks.
  • Stored, Deflate (isal), Deflate64, BZIP2, LZMA, XZ and Zstandard. Other methods, such as PPMd, raise UnsupportedCompressionMethod before any request, and raw=True still returns the stored bytes. Callers can plug in decoders.
  • Split archives and Images: spanned zips (dump.z01 … dump.zip), found from the last part, and byte-split sets (dump.zip.001, disk.dd.001 …), found from the first: client.scan("bucket", "disk.dd.001"). A list of keys names the parts explicitly.
  • tar (ustar, GNU, PAX), gzip, bare xz, bzip2 and Zstandard streams, and archives nested to any depth: zip in zip, tar.gz, tar in zip, zip in tar. client.scan_member(pointer) scans the archive inside a member. The format is detected from the bytes.
  • Seek checkpoints for tar inside gzip or inside a Deflate member: client.scan(..., checkpoints="s3://bucket/key.dfi") writes a checkpoint index on Linux and macOS, so a fetch decodes from a nearby checkpoint instead of from the start. Without one, a fetch decodes and discards up to discard_limit (64 MiB by default) and raises DiscardLimitExceeded past it.
  • Disk images: E01 and Ex01 (found from the first segment, every segment followed), raw dd, MBR and GPT partition tables, and NTFS. client.scan("bucket", "disk.E01") lists the partitions, and client.scan_member(partition_pointer) lists the NTFS files with paths. LZNT1 and CompactOS (WOF) compressed files decode, and named streams are listed. Images in many segments get short pointers through a source series.
  • 7z: solid and non-solid, LZMA, LZMA2, BZip2, Deflate, Deflate64, Copy, Delta, the BCJ, ARM, ARMT, PPC, SPARC and IA64 filters, and 7zAES with an encrypted header (scan(..., password=...), deepfetch[aes]). A 7z can sit inside any other format, and any format inside a 7z. PPMd, BCJ2, ARM64 and RISC-V raise UnsupportedCompressionMethod.
  • ext2, ext3 and ext4 Filesystems, raw, in a partition (MBR type 83 or GPT Linux data) or in an E01: every file, directory and symbolic link with its path. Extents, block maps, holes, uninitialized extents and inline data read. The journal is not replayed and fscrypt data is not decrypted.
  • FAT12, FAT16, FAT32 and exFAT Filesystems, on a raw volume, in a partition or inside an E01: in-use files and directories with long and Unicode names. Deleted files are not listed.
  • Encrypted zip members, ZipCrypto and WinZip AES, decrypt with password= on fetch, stream and scan_member. AES needs deepfetch[aes]. A wrong password raises WrongPassword.
  • File metadata from every format: NTFS $STANDARD_INFORMATION and $FILE_NAME times to 100 ns, ext times to the nanosecond with creation time, FAT and exFAT times with their zones, zip NTFS and Unix extra fields, PAX times, 7z times and attributes.
  • An E01 or Ex01 scan's header.image holds the media MD5 and SHA-1 the imager stored, and the case number, examiner, acquisition date and other acquisition fields.
  • Every read is pinned to the archive's ETag. A replaced archive raises ObjectChanged.

docs/spec/0.2.md, 0.3.md, 0.4.md, 0.5.md, 0.6.md, 0.7.md, 0.8.md, 0.9.md and 1.0.md list what each release adds.

Develop

See CONTRIBUTING.md. Security reports go through SECURITY.md.

uv venv --python 3.11 && uv pip install -e ".[dev]"
.venv/Scripts/python -m pytest -q

The S3 tests run against moto. Set DEEPFETCH_TEST_S3_ENDPOINT plus AWS credentials to run them against a real S3-compatible server too.

To run the S3 suite and check-store against a local RustFS, an S3-compatible server, as CI does:

docker run -d --name deepfetch-s3 -p 127.0.0.1:9000:9000 \
  -e RUSTFS_ACCESS_KEY=deepfetch -e RUSTFS_SECRET_KEY=deepfetch-secret rustfs/rustfs:1.0.7
export AWS_ACCESS_KEY_ID=deepfetch AWS_SECRET_ACCESS_KEY=deepfetch-secret AWS_DEFAULT_REGION=us-east-1
DEEPFETCH_TEST_S3_ENDPOINT=http://127.0.0.1:9000 python -m pytest -q tests/test_storage_s3.py
AWS_ENDPOINT_URL=http://127.0.0.1:9000 AWS_ALLOW_HTTP=true AWS_VIRTUAL_HOSTED_STYLE_REQUEST=false \
  deepfetch check-store s3://deepfetch-test/ci

.github/workflows/ci.yml runs the suite on Linux, macOS and Windows, these S3 server steps, and a checked build of the package.

Metadata

Release files for deepfetch 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepfetch 1.0.0
File Size Uploaded Provenance Actions
deepfetch-1.0.0.tar.gz 4.2 MB With provenance Details for deepfetch-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deepfetch 1.0.0
File Interpreter ABI Platform Actions
deepfetch-1.0.0-py3-none-any.whl Python 3 none any Details for deepfetch-1.0.0-py3-none-any.whl

Total release size: 4.3 MB

Release files / deepfetch-1.0.0.tar.gz

Download URL deepfetch-1.0.0.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
237c8a3c38619e52482ce9d7e331bb27cebd04dc8b94e72bd0c1b5138cc637ee
BLAKE2b-256 checksum
How to use checksums
ef9a26e181f0eb5f32564e07180f99b39519a78a38b894e9ce04121ed6fb317f
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 Dec 2, 2026.

Transparency log

Release files / deepfetch-1.0.0-py3-none-any.whl

Download URL deepfetch-1.0.0-py3-none-any.whl
Size 155.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1114ffb216f30bf4de31ed983d54451dd9ac03bfa008c01100a69fece4cf5b21
BLAKE2b-256 checksum
How to use checksums
86411cc15bff458d4f040fc6093e17965436b610a49722f4c764ce78d009eaa6
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 Dec 2, 2026.

Transparency log

Security for deepfetch 1.0.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deepfetch-1.0.0.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 Dec 2, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page