Metadata-Version: 2.4
Name: unzip-http
Version: 0.7
Summary: extract files from .zip files over http without downloading entire archive
Author: Saul Pwanson
Project-URL: Homepage, https://github.com/saulpw/unzip-http
Keywords: http,zip,unzip
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE-mit.txt
Requires-Dist: urllib3
Dynamic: license-file

# 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 <filenames> 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 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](https://saul.pw) and made available for use under the MIT License.

# Similar Libraries

- [python-remotezip](https://github.com/gtsystem/python-remotezip)
- [PyRemoteZip](https://github.com/fcvarela/pyremotezip)
