Seamless reading of nested archives
Project description
Allows simplified access to files in nested archives.
Example
Given an archive placed in /tmp/foobar/foo.tar
with this structure:
foo.tar
- foo1
- foo2
- bar.tar
- bar1
- bar2
- foo3.tar.gz
- foo4
- foo5
- foo6.tar.gz
- foo7
- foo8
- abc/
- def
- ghi
This library will allow reading the contents of the files in this nested archive in the following "seamless" manner:
nestedarchive.get("/tmp/foobar/foo.tar/foo1")
nestedarchive.get("/tmp/foobar/foo.tar/abc/def")
nestedarchive.get("/tmp/foobar/foo.tar/bar.tar/bar1")
nestedarchive.get("/tmp/foobar/foo.tar/bar.tar/foo3.tar.gz/foo4")
Globs are also supported - all matches are tried until one is found that (eventually) contains the expected file, e.g.:
- nestedarchive.get("/tmp/foobar/foo.tar/bar.tar/foo*.tar.gz/foo7")
Will first silently try foo3.tar.gz
and fail because it does not contain foo7
, then it will try foo6.tar.gz
and
succeed because foo6.tar.gz
contains foo7
Currently supported extensions:
- tar
- tar.gz
Currently tested operating systems:
- linux
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
Built Distribution
File details
Details for the file nestedarchive-0.2.4.tar.gz
.
File metadata
- Download URL: nestedarchive-0.2.4.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f81f272a9d25873a307040951ab42a1f1d0ce3a3902a274d49a7cc87e2f1fa0 |
|
MD5 | 82889bfae62823948ff665f0f189be63 |
|
BLAKE2b-256 | 85c42d43043d92dc3b0bc6d9510ac89d0283a97a93adc38163fd87f44ce57504 |
File details
Details for the file nestedarchive-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: nestedarchive-0.2.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 640d36320b0353da2caadf06292bce1b81d0cc955fa5df4d0385ef3bee8c3061 |
|
MD5 | ff3cce779bb3dff23149667d06ba83c8 |
|
BLAKE2b-256 | f5a668e2a4f0988f24ece6d923e6eacef4352ddcc4f1975b08cfbd9a16f20ecf |