Arpy
This library can be used to access ar files from python.
It supports both GNU and BSD formats and exposes the archived files using the standard python file interface.
Usage
Standard file usage:
With context managers:
with arpy.Archive('file.ar') as ar:
print("files: %s" % ar.namelist())
with ar.open('content.txt') as f:
print(f.read())
Via headers for duplicate names:
with arpy.Archive('file.ar') as ar:
for header in ar.infolist():
print("file: %s" % header.name)
with ar.open(header) as f:
print(f.read())
Or directly:
ar = arpy.Archive('file.ar'))
ar.read_all_headers()
# check all available files
ar.archived_files.keys()
# get the contents of the archived file
ar.archived_files[b'some_file'].read()
Stream / pipe / ... usage:
ar = arpy.Archive('file.ar'))
for f in ar:
print("got file name: %s" % f.header.name)
print("with contents: %s" % f.read())
Contributions
All contributions welcome. Just make sure that:
- tests are provided
- all current platforms are passing (tox configuration is provided)
- coverage is close to 100% (currently only missing statements are those depending on python version being used)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arpy-2.4.0.tar.gz.
File metadata
- Download URL: arpy-2.4.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ce13869a2df98b420adeaf7429b63796e8c000969d2dfe471854c0be3d9a54
|
|
| MD5 |
eaebbf56161a044eafb697c0b8352b22
|
|
| BLAKE2b-256 |
409d1febb3091ab01710abb1628194f3c0f5d97f7e5c97f3fbcdaf55e30bdd4b
|
Provenance
The following attestation bundles were made for arpy-2.4.0.tar.gz:
Publisher:
CI.yml on onekey-sec/arpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arpy-2.4.0.tar.gz -
Subject digest:
e2ce13869a2df98b420adeaf7429b63796e8c000969d2dfe471854c0be3d9a54 - Sigstore transparency entry: 2660606440
- Sigstore integration time:
-
Permalink:
onekey-sec/arpy@9bd29c69d20e9d93089f35ddadbb9c49e9a0a5b8 -
Branch / Tag:
refs/tags/2.4.0 - Owner: https://github.com/onekey-sec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@9bd29c69d20e9d93089f35ddadbb9c49e9a0a5b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file arpy-2.4.0-py3-none-any.whl.
File metadata
- Download URL: arpy-2.4.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c341410d0df54af903fcd18e4b82e7cfe2b5ed10a186cf6cb53e664e70449ba2
|
|
| MD5 |
e97900087851adfc4c51df5cc4b8684d
|
|
| BLAKE2b-256 |
60560ed5dc83e59537e0ee3726b008ed06736577169ba5cfaed989356abb5609
|
Provenance
The following attestation bundles were made for arpy-2.4.0-py3-none-any.whl:
Publisher:
CI.yml on onekey-sec/arpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arpy-2.4.0-py3-none-any.whl -
Subject digest:
c341410d0df54af903fcd18e4b82e7cfe2b5ed10a186cf6cb53e664e70449ba2 - Sigstore transparency entry: 2660606491
- Sigstore integration time:
-
Permalink:
onekey-sec/arpy@9bd29c69d20e9d93089f35ddadbb9c49e9a0a5b8 -
Branch / Tag:
refs/tags/2.4.0 - Owner: https://github.com/onekey-sec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@9bd29c69d20e9d93089f35ddadbb9c49e9a0a5b8 -
Trigger Event:
push
-
Statement type: