ar
Access ar archive files (.a)!
What it is and what it does
ar is a pure-Python parser for Unix ar archive files (.a), commonly used in build systems and static libraries. It provides a simple interface to iterate over archive entries, read individual file contents, and extract files to disk without requiring external tools or compiled dependencies.
The package exposes an Archive class that wraps a binary file handle and supports iteration over entries, opening and reading specific files by name, and extracting all contents. It supports Python 3.8 through 3.11 and has no external runtime dependencies, making it lightweight for build automation, static library inspection, or archive manipulation in pure Python environments.
Use it for:
- Extract object files or metadata from static libraries (.a) in build pipelines.
- Inspect the contents of ar archives without invoking system tools like ar or tar.
- Read embedded files from ar archives in cross-platform Python applications.
- Automate library analysis or dependency inspection in CI/CD workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and reads ar archive files (.a), allowing you to list, extract, and read individual files from Unix ar archives without external dependencies.
Yes, if you need to parse ar archives in Python without system dependencies. The package is straightforward, has no external runtime dependencies, and covers a narrow but real use case. Maintenance is aging but not abandoned; the code is stable and suitable for build automation or library inspection tasks where ar format support is needed.
Install
ar on PyPI
pip
pip install aruv
uv add arpoetry
poetry add arInstalling ar
Before you install
Low friction installation with no runtime dependencies. Maintenance status is aging—last commit was 2025-12-18, but the repository is not archived and the package remains functional.
License in practice
Licensed under Apache License Version 2.0, a permissive license that allows commercial and derivative use with minimal restrictions, requiring only attribution and notice of modifications.
Quickstart
pip install ar
from ar import Archive
with open('file.a', 'rb') as f:
archive = Archive(f)
for entry in archive:
print(entry.name)
Requires Python 3.8 or later; ar archives must be opened in binary mode.
Verify before relying
- Whether the package handles all ar archive variants (GNU, BSD, etc.) or has known format limitations.
- Performance characteristics when working with large archives or many files.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 310 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 109,543/month — #12,513 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ar-1.0.1-py3-none-any.whl
Keywords: ar, archive, extract, library
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
arpyArpy reads and extracts files from ar archives…
permissive · top 15,000 on PyPI
unix-arReads and writes AR archive files (Unix static…
permissive · top 5,000 on PyPI
arcpGenerate and parse arcp (Archive and Package)…
permissive · top 15,000 on PyPI
extractcodeExtracts a wide range of archive formats (tar,…
permissive · top 15,000 on PyPI
libarchive-clibarchive-c provides a Python interface to…
permissive · top 15,000 on PyPI
unrarProvides Python access to RAR archive files…
copyleft · top 15,000 on PyPI
python-debianReads and manipulates Debian packaging metadata…
copyleft · top 5,000 on PyPI
harfileWrites HTTP Archive (HAR) files in Python with…
permissive · top 5,000 on PyPI
pyunpackUnpacks archive files in Python with support…
permissive · top 15,000 on PyPI
kaldi-python-ioReads and writes Kaldi binary archives,…
permissive · top 15,000 on PyPI