Skip to main content

Access ar archive files (.a)!

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ar-1.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ar-1.0.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file ar-1.0.1.tar.gz.

File metadata

  • Download URL: ar-1.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ar-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8fc8e64ac2fd157b9f285b1c981083f2e906258322ff5e4413c0096f67fc2003
MD5 9ce270de1dfb59a47b5ba762a18d770e
BLAKE2b-256 2b0f13f26fda15101f3415fab75456f5abc967a8c848287cf0b3dabc4b64d65a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ar-1.0.1.tar.gz:

Publisher: python-package.yml on vidstige/ar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ar-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ar-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ar-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee6b676acbe1c31b28e108361f23e44432324dafc87a782e9286896bf77dec8e
MD5 53198235f97241e965d42b50ef3144eb
BLAKE2b-256 deb9919ec85022e3b4c7b8bdf7729720666fe4d5eaff016a85b301bf0ce67798

See more details on using hashes here.

Provenance

The following attestation bundles were made for ar-1.0.1-py3-none-any.whl:

Publisher: python-package.yml on vidstige/ar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page