Skip to main content

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)

Source distribution for arpy 2.4.0
File Size Uploaded
arpy-2.4.0.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arpy 2.4.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.3.0

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.1

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.2.0

1 release file

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page