unzip-http 0.6__tar.gz → 0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unzip-http-0.6/unzip_http.egg-info → unzip_http-0.7}/PKG-INFO +14 -7
- {unzip-http-0.6 → unzip_http-0.7}/README.md +6 -1
- unzip_http-0.7/pyproject.toml +26 -0
- {unzip-http-0.6 → unzip_http-0.7/unzip_http.egg-info}/PKG-INFO +14 -7
- {unzip-http-0.6 → unzip_http-0.7}/unzip_http.egg-info/SOURCES.txt +1 -2
- {unzip-http-0.6 → unzip_http-0.7}/unzip_http.py +6 -0
- unzip-http-0.6/requirements.txt +0 -1
- unzip-http-0.6/setup.py +0 -35
- {unzip-http-0.6 → unzip_http-0.7}/LICENSE-mit.txt +0 -0
- {unzip-http-0.6 → unzip_http-0.7}/MANIFEST.in +0 -0
- {unzip-http-0.6 → unzip_http-0.7}/setup.cfg +0 -0
- {unzip-http-0.6 → unzip_http-0.7}/unzip_http.egg-info/dependency_links.txt +0 -0
- {unzip-http-0.6 → unzip_http-0.7}/unzip_http.egg-info/entry_points.txt +0 -0
- {unzip-http-0.6 → unzip_http-0.7}/unzip_http.egg-info/requires.txt +0 -0
- {unzip-http-0.6 → unzip_http-0.7}/unzip_http.egg-info/top_level.txt +0 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: unzip-http
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7
|
|
4
4
|
Summary: extract files from .zip files over http without downloading entire archive
|
|
5
|
-
Home-page: https://github.com/saulpw/unzip-http
|
|
6
5
|
Author: Saul Pwanson
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Project-URL: Homepage, https://github.com/saulpw/unzip-http
|
|
7
|
+
Keywords: http,zip,unzip
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE-mit.txt
|
|
13
|
+
Requires-Dist: urllib3
|
|
14
|
+
Dynamic: license-file
|
|
13
15
|
|
|
14
16
|
# unzip-http
|
|
15
17
|
|
|
@@ -34,7 +36,7 @@ Note: HTTP server must send `Accept-Ranges: bytes` and `Content-Length` in heade
|
|
|
34
36
|
Options:
|
|
35
37
|
|
|
36
38
|
- `-l`: List files in remote .zip file (default if no filenames given)
|
|
37
|
-
- `-f`: Recreate folder structure from .zip file when extracting (instead of extracting files
|
|
39
|
+
- `-f`: Recreate folder structure from .zip file when extracting (instead of extracting files directly to the current directory)
|
|
38
40
|
- `-o`: Write files to stdout (if multiple files, concatenate them in zipfile order)
|
|
39
41
|
|
|
40
42
|
# Python module `unzip_http`
|
|
@@ -48,3 +50,8 @@ Options:
|
|
|
48
50
|
# Credits
|
|
49
51
|
|
|
50
52
|
`unzip-http` was written by [Saul Pwanson](https://saul.pw) and made available for use under the MIT License.
|
|
53
|
+
|
|
54
|
+
# Similar Libraries
|
|
55
|
+
|
|
56
|
+
- [python-remotezip](https://github.com/gtsystem/python-remotezip)
|
|
57
|
+
- [PyRemoteZip](https://github.com/fcvarela/pyremotezip)
|
|
@@ -21,7 +21,7 @@ Note: HTTP server must send `Accept-Ranges: bytes` and `Content-Length` in heade
|
|
|
21
21
|
Options:
|
|
22
22
|
|
|
23
23
|
- `-l`: List files in remote .zip file (default if no filenames given)
|
|
24
|
-
- `-f`: Recreate folder structure from .zip file when extracting (instead of extracting files
|
|
24
|
+
- `-f`: Recreate folder structure from .zip file when extracting (instead of extracting files directly to the current directory)
|
|
25
25
|
- `-o`: Write files to stdout (if multiple files, concatenate them in zipfile order)
|
|
26
26
|
|
|
27
27
|
# Python module `unzip_http`
|
|
@@ -35,3 +35,8 @@ Options:
|
|
|
35
35
|
# Credits
|
|
36
36
|
|
|
37
37
|
`unzip-http` was written by [Saul Pwanson](https://saul.pw) and made available for use under the MIT License.
|
|
38
|
+
|
|
39
|
+
# Similar Libraries
|
|
40
|
+
|
|
41
|
+
- [python-remotezip](https://github.com/gtsystem/python-remotezip)
|
|
42
|
+
- [PyRemoteZip](https://github.com/fcvarela/pyremotezip)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "unzip-http"
|
|
7
|
+
version = "0.7"
|
|
8
|
+
description = "extract files from .zip files over http without downloading entire archive"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
keywords = ["http", "zip", "unzip"]
|
|
12
|
+
authors = [{name = "Saul Pwanson"}]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 5 - Production/Stable",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
]
|
|
17
|
+
dependencies = ["urllib3"]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "https://github.com/saulpw/unzip-http"
|
|
21
|
+
|
|
22
|
+
[project.scripts]
|
|
23
|
+
unzip_http = "unzip_http:main"
|
|
24
|
+
|
|
25
|
+
[tool.setuptools]
|
|
26
|
+
py-modules = ["unzip_http"]
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: unzip-http
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7
|
|
4
4
|
Summary: extract files from .zip files over http without downloading entire archive
|
|
5
|
-
Home-page: https://github.com/saulpw/unzip-http
|
|
6
5
|
Author: Saul Pwanson
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Project-URL: Homepage, https://github.com/saulpw/unzip-http
|
|
7
|
+
Keywords: http,zip,unzip
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE-mit.txt
|
|
13
|
+
Requires-Dist: urllib3
|
|
14
|
+
Dynamic: license-file
|
|
13
15
|
|
|
14
16
|
# unzip-http
|
|
15
17
|
|
|
@@ -34,7 +36,7 @@ Note: HTTP server must send `Accept-Ranges: bytes` and `Content-Length` in heade
|
|
|
34
36
|
Options:
|
|
35
37
|
|
|
36
38
|
- `-l`: List files in remote .zip file (default if no filenames given)
|
|
37
|
-
- `-f`: Recreate folder structure from .zip file when extracting (instead of extracting files
|
|
39
|
+
- `-f`: Recreate folder structure from .zip file when extracting (instead of extracting files directly to the current directory)
|
|
38
40
|
- `-o`: Write files to stdout (if multiple files, concatenate them in zipfile order)
|
|
39
41
|
|
|
40
42
|
# Python module `unzip_http`
|
|
@@ -48,3 +50,8 @@ Options:
|
|
|
48
50
|
# Credits
|
|
49
51
|
|
|
50
52
|
`unzip-http` was written by [Saul Pwanson](https://saul.pw) and made available for use under the MIT License.
|
|
53
|
+
|
|
54
|
+
# Similar Libraries
|
|
55
|
+
|
|
56
|
+
- [python-remotezip](https://github.com/gtsystem/python-remotezip)
|
|
57
|
+
- [PyRemoteZip](https://github.com/fcvarela/pyremotezip)
|
|
@@ -151,11 +151,17 @@ class RemoteZipFile:
|
|
|
151
151
|
|
|
152
152
|
def infoiter(self):
|
|
153
153
|
resp = self.http.request('HEAD', self.url)
|
|
154
|
+
if not (200 <= resp.status <= 299):
|
|
155
|
+
error(f'cannot open URL: HTTP status {resp.status}')
|
|
156
|
+
|
|
154
157
|
r = resp.headers.get('Accept-Ranges', '')
|
|
155
158
|
if r != 'bytes':
|
|
156
159
|
hostname = urllib.parse.urlparse(self.url).netloc
|
|
157
160
|
warning(f"{hostname} Accept-Ranges header ('{r}') is not 'bytes'--trying anyway")
|
|
158
161
|
|
|
162
|
+
if 'Content-Length' not in resp.headers:
|
|
163
|
+
error('cannot open URL: missing Content-Length header')
|
|
164
|
+
|
|
159
165
|
self.zip_size = int(resp.headers['Content-Length'])
|
|
160
166
|
resp = self.get_range(
|
|
161
167
|
max(self.zip_size-65536, 0),
|
unzip-http-0.6/requirements.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
urllib3
|
unzip-http-0.6/setup.py
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# SPDX-License-Identifier: MIT
|
|
2
|
-
|
|
3
|
-
from setuptools import setup
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def readme():
|
|
7
|
-
with open("README.md") as f:
|
|
8
|
-
return f.read()
|
|
9
|
-
|
|
10
|
-
def requirements():
|
|
11
|
-
with open("requirements.txt") as f:
|
|
12
|
-
return f.read().split("\n")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
setup(
|
|
16
|
-
name="unzip-http",
|
|
17
|
-
version="0.6",
|
|
18
|
-
description="extract files from .zip files over http without downloading entire archive",
|
|
19
|
-
long_description=readme(),
|
|
20
|
-
long_description_content_type="text/markdown",
|
|
21
|
-
classifiers=[
|
|
22
|
-
"Development Status :: 4 - Beta",
|
|
23
|
-
"Programming Language :: Python :: 3",
|
|
24
|
-
],
|
|
25
|
-
keywords="http zip unzip",
|
|
26
|
-
author="Saul Pwanson",
|
|
27
|
-
url="https://github.com/saulpw/unzip-http",
|
|
28
|
-
python_requires=">=3.8",
|
|
29
|
-
py_modules=["unzip_http"],
|
|
30
|
-
scripts=["unzip_http.py"],
|
|
31
|
-
entry_points={
|
|
32
|
-
"console_scripts": ["unzip_http=unzip_http:main"],
|
|
33
|
-
},
|
|
34
|
-
install_requires=requirements(),
|
|
35
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|