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:
import nestedarchive
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
If you want to get all files matching a glob, use get_all instead. get_all
does not support a mode parameter, it always returns binary file data.
You can also access a URL instead of a local file path:
archive = nestedarchive.RemoteNestedArchive("https://example.com/archive.tar")
content = archive.get("/nested/path/file.txt")
Currently supported extensions:
- tar
- tar.gz
Currently tested operating systems:
- linux
Metadata
Release files for nestedarchive 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nestedarchive-0.3.1.tar.gz | 5.3 kB | Without provenance | Details for nestedarchive-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nestedarchive-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for nestedarchive-0.3.1-py3-none-any.whl |
Total release size: 11.3 kB
Release files / nestedarchive-0.3.1.tar.gz
| Download URL | nestedarchive-0.3.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52ae12d234582ed718cf51f41daa2dbbda9d85203980efc7dd361de9f03e8be1
|
|
BLAKE2b-256 checksum How to use checksums |
9c7234ce0d8c2ff1a13c0f7eb8a6405b2b38821ea70cb1bec5e413b208839c07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / nestedarchive-0.3.1-py3-none-any.whl
| Download URL | nestedarchive-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad6416838ee81a4a16ab02acfa527ff21658e012dd10c0ec7c79d1eafb7d1218
|
|
BLAKE2b-256 checksum How to use checksums |
d7ce8b4937d41a64fd47a142ad774889dee01a15c41fad636517f9fd7c107a67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for nestedarchive 0.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.