ar


Namear JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryAccess ar archive files (.a)!
upload_time2024-09-12 09:46:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords ar archive extract library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![build](https://github.com/vidstige/ar/actions/workflows/python-package.yml/badge.svg)

![python-3.11](https://img.shields.io/badge/python-3.11-success)
![python-3.10](https://img.shields.io/badge/python-3.10-success)
![python-3.9](https://img.shields.io/badge/python-3.9-success)
![python-3.8](https://img.shields.io/badge/python-3.8-success)
![python-3.7](https://img.shields.io/badge/python-3.7-success)


# ar
Python package for parsing ar archive file. 

## Installation
`pip install ar`

## Usage
List files inside `file.a`
```python
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`.

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

Extract all files:
```python
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]'

## Author
Samuel Carlsson

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "ar, archive, extract, library",
    "author": null,
    "author_email": "Samuel Carlsson <samuel.carlsson@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6c/68/1cf29d90cc65a4964143db2c2d2849959faee398b427a88f376487884d90/ar-1.0.0.tar.gz",
    "platform": null,
    "description": "![build](https://github.com/vidstige/ar/actions/workflows/python-package.yml/badge.svg)\n\n![python-3.11](https://img.shields.io/badge/python-3.11-success)\n![python-3.10](https://img.shields.io/badge/python-3.10-success)\n![python-3.9](https://img.shields.io/badge/python-3.9-success)\n![python-3.8](https://img.shields.io/badge/python-3.8-success)\n![python-3.7](https://img.shields.io/badge/python-3.7-success)\n\n\n# ar\nPython package for parsing ar archive file. \n\n## Installation\n`pip install ar`\n\n## Usage\nList files inside `file.a`\n```python\nfrom ar import Archive\nwith open('file.a', 'rb') as f:\n  archive = Archive(f)\n  for entry in archive:\n    print(entry.name)\n```\n\nRead content of `file.txt` contained within `file.a`.\n\n```python\nfrom ar import Archive\nwith open('file.a', 'rb') as f:\n  archive = Archive(f)\n  print(archive.open('file.txt').read())\n```\n\nExtract all files:\n```python\nfrom ar import Archive\nwith open('file.a', 'rb') as f:\n  archive = Archive(f)\n  for entry in archive:\n    with open(entry.name, 'wb') as output:\n      content = archive.open(entry, 'rb').read()\n      output.write(content)\n```\n\n## Developing\nCreate a virtual environment using python version of liking\n\n    python3.10 -m venv venv\n  \nActivate it\n\n    source venv/bin/activate\n\nInstall package editable together with relevant optional dependencies\n\n    pip install -e '.[test,dev]'\n\n## Author\nSamuel Carlsson\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Access ar archive files (.a)!",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/vidstige/ar/issues",
        "Repository": "https://github.com/vidstige/ar/"
    },
    "split_keywords": [
        "ar",
        " archive",
        " extract",
        " library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13049ef101e19e669dd96326c4d39a3a4e74902a2b0122a93761d966de4e66a7",
                "md5": "7668f49bfff050d547875c3e01a8ae60",
                "sha256": "8d51ef2616433ab399231100b2e40a14a26987d57ed0c6ecf975b7ab8d3f69cf"
            },
            "downloads": -1,
            "filename": "ar-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7668f49bfff050d547875c3e01a8ae60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4192,
            "upload_time": "2024-09-12T09:46:08",
            "upload_time_iso_8601": "2024-09-12T09:46:08.611706Z",
            "url": "https://files.pythonhosted.org/packages/13/04/9ef101e19e669dd96326c4d39a3a4e74902a2b0122a93761d966de4e66a7/ar-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c681cf29d90cc65a4964143db2c2d2849959faee398b427a88f376487884d90",
                "md5": "52b67b13c04d59b1200ab119d304fc3b",
                "sha256": "15be072f33c7ec3fccadbfeced14cc120edc3a5d815fc742a90c12e29d1848db"
            },
            "downloads": -1,
            "filename": "ar-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "52b67b13c04d59b1200ab119d304fc3b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3426,
            "upload_time": "2024-09-12T09:46:09",
            "upload_time_iso_8601": "2024-09-12T09:46:09.860667Z",
            "url": "https://files.pythonhosted.org/packages/6c/68/1cf29d90cc65a4964143db2c2d2849959faee398b427a88f376487884d90/ar-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 09:46:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vidstige",
    "github_project": "ar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ar"
}
        
Elapsed time: 0.32739s