This package allows the reading and writing of AR (archiver) archive files, which are commonly used in Unix-like systems for static libraries and Debian packages. It is inspired by Python's standard library `tarfile` and `zipfile` modules. The library is currently in 'Beta' development status and primarily supports the BSD variant of the common AR archive format.
pip install unix-arVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a new AR archive, add files to it, and then read its contents and extract specific members using `unix_ar.open()` and `Archive` methods.
Evaluate if the current feature set meets your needs. For critical projects, consider alternatives or be prepared to maintain a fork.
Verify the AR archive format you are working with. If you need to handle non-BSD variants, this library may not be suitable. The `ar` command line tool itself has several variants for specific platforms.
Be aware of the `ar -D` flag's implications if you're mixing Python `unix-ar` operations with external `ar` command usage. If precise metadata is crucial, explicitly check and handle it.