Skip to main content

build

python-3.11 python-3.10 python-3.9 python-3.8

ar

Python package for parsing ar archive file.

Installation

pip install ar

Usage

List files inside file.a

from ar import Archive
with open('file.a', 'rb') as f:
  archive = Archive(f)
  for entry in archive:
    print(entry.name)

Read content of file.txt contained within file.a.

from ar import Archive
with open('file.a', 'rb') as f:
  archive = Archive(f)
  print(archive.open('file.txt').read())

Extract all files:

from ar import Archive
with open('file.a', 'rb') as f:
  archive = Archive(f)
  for entry in archive:
    with open(entry.name, 'wb') as output:
      content = archive.open(entry, 'rb').read()
      output.write(content)

Developing

Create a virtual environment using python version of liking

python3.10 -m venv venv

Activate it

source venv/bin/activate

Install package editable together with relevant optional dependencies

pip install -e '.[test,dev]'

License

Licensed under the Apache License, Version 2.0.

Author

Samuel Carlsson

Release files for ar 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ar 1.0.1
File Size Uploaded
ar-1.0.1.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ar 1.0.1
File Interpreter ABI Platform
ar-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / ar-1.0.1.tar.gz

Download URL ar-1.0.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8fc8e64ac2fd157b9f285b1c981083f2e906258322ff5e4413c0096f67fc2003
BLAKE2b-256 checksum
How to use checksums
2b0f13f26fda15101f3415fab75456f5abc967a8c848287cf0b3dabc4b64d65a
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 Oct 8, 2025.

Transparency log

Release files / ar-1.0.1-py3-none-any.whl

Download URL ar-1.0.1-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee6b676acbe1c31b28e108361f23e44432324dafc87a782e9286896bf77dec8e
BLAKE2b-256 checksum
How to use checksums
deb9919ec85022e3b4c7b8bdf7729720666fe4d5eaff016a85b301bf0ce67798
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 Oct 8, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.9.1

2 release files

0.9

2 release files

0.8

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

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