Skip to main content

extract files from .zip files over http without downloading entire archive

Project description

unzip-http

Extract individual files from .zip files over http without downloading the entire archive.

Install

pip install unzip-http

Usage

unzip_http [-l] [-f] [-o] <url> <filenames..>

Extract from a remote .zip at <url> to stdout.

A filename can be a wildcard glob; all matching files are extracted in this case.

Specify multiple filenames as distinct arguments (separated with spaces on the command line).

Note: HTTP server must send Accept-Ranges: bytes and Content-Length in headers (most do).

Options:

  • -l: List files in remote .zip file (default if no filenames given)
  • -f: Recreate folder structure from .zip file when extracting (instead of extracting files to the current directly to the current directory)
  • -o: Write files to stdout (if multiple files, concatenate them in zipfile order)

Python module unzip_http

import unzip_http

rzf = unzip_http.RemoteZipFile('https://example.com/foo.zip')
binfp = rzf.open('bar.bin')
txtfp = rzf.open_text('baz.txt')

Credits

unzip-http was written by Saul Pwanson and made available for use under the MIT License.

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

unzip-http-0.6.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

unzip_http-0.6-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file unzip-http-0.6.tar.gz.

File metadata

  • Download URL: unzip-http-0.6.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for unzip-http-0.6.tar.gz
Algorithm Hash digest
SHA256 4b9dc5bea5e38164fe45110115b10f287440edde8ecb4be661d1c612feb2b2c8
MD5 e989313b0c879558d95e9a93d0f7fc73
BLAKE2b-256 d4c8b4253fcf7015cc25e88be74608618abe4b260aca3e2dee96fa884eeb9a08

See more details on using hashes here.

File details

Details for the file unzip_http-0.6-py3-none-any.whl.

File metadata

  • Download URL: unzip_http-0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for unzip_http-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2e8049e659b2d212d9135b427cf793032b0c6dcb4f69b83a7e5b1008882d41e4
MD5 1978977a51f7045e68af30d54a391e5e
BLAKE2b-256 0c4b901d8ab397f89c2079526d8421e62c2fc6b0a78c0522001a59a3c9ddded4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page