Access ar archive files (.a)!
Project description
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) as output:
content = entry.get_stream().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]'
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ar-0.8.tar.gz.
File metadata
- Download URL: ar-0.8.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5871651a9ef25988f559720bf72e3546b154f85c695997066cef9e0b162bfe83
|
|
| MD5 |
038efd80813daf7c445692b59a4908a3
|
|
| BLAKE2b-256 |
bf3b22a244da0f2f1496515f7dc0f48819260f0c7d7f31619baf15071c3baa6f
|
File details
Details for the file ar-0.8-py3-none-any.whl.
File metadata
- Download URL: ar-0.8-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ef917e875baef27cb931ad310c4087a204d31b23ee78d0a3707c7a160bd24b6
|
|
| MD5 |
057c353c2ff2b4e718bc01cc3d3bb72f
|
|
| BLAKE2b-256 |
d5bd5a13d802fc7f7dc575898fdf46aff02c72bc8b99c713fcd8aa11493cd38f
|