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)
Metadata
Release files for arpy 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arpy-2.4.0.tar.gz | 11.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arpy-2.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / arpy-2.4.0.tar.gz
| Download URL | arpy-2.4.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2ce13869a2df98b420adeaf7429b63796e8c000969d2dfe471854c0be3d9a54
|
|
BLAKE2b-256 checksum How to use checksums |
409d1febb3091ab01710abb1628194f3c0f5d97f7e5c97f3fbcdaf55e30bdd4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency logRelease files / arpy-2.4.0-py3-none-any.whl
| Download URL | arpy-2.4.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c341410d0df54af903fcd18e4b82e7cfe2b5ed10a186cf6cb53e664e70449ba2
|
|
BLAKE2b-256 checksum How to use checksums |
60560ed5dc83e59537e0ee3726b008ed06736577169ba5cfaed989356abb5609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.
Transparency log