ar


Namear JSON
Version 0.8 PyPI version JSON
download
home_page
SummaryAccess ar archive files (.a)!
upload_time2024-01-23 19:19:54
maintainer
docs_urlNone
author
requires_python>=3.7
license
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) 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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ar",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "ar,archive,extract,library",
    "author": "",
    "author_email": "Samuel Carlsson <samuel.carlsson@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bf/3b/22a244da0f2f1496515f7dc0f48819260f0c7d7f31619baf15071c3baa6f/ar-0.8.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) as output:\n      content = entry.get_stream().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": "",
    "summary": "Access ar archive files (.a)!",
    "version": "0.8",
    "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": "d5bd5a13d802fc7f7dc575898fdf46aff02c72bc8b99c713fcd8aa11493cd38f",
                "md5": "057c353c2ff2b4e718bc01cc3d3bb72f",
                "sha256": "6ef917e875baef27cb931ad310c4087a204d31b23ee78d0a3707c7a160bd24b6"
            },
            "downloads": -1,
            "filename": "ar-0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "057c353c2ff2b4e718bc01cc3d3bb72f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7324,
            "upload_time": "2024-01-23T19:19:51",
            "upload_time_iso_8601": "2024-01-23T19:19:51.540843Z",
            "url": "https://files.pythonhosted.org/packages/d5/bd/5a13d802fc7f7dc575898fdf46aff02c72bc8b99c713fcd8aa11493cd38f/ar-0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf3b22a244da0f2f1496515f7dc0f48819260f0c7d7f31619baf15071c3baa6f",
                "md5": "038efd80813daf7c445692b59a4908a3",
                "sha256": "5871651a9ef25988f559720bf72e3546b154f85c695997066cef9e0b162bfe83"
            },
            "downloads": -1,
            "filename": "ar-0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "038efd80813daf7c445692b59a4908a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7663,
            "upload_time": "2024-01-23T19:19:54",
            "upload_time_iso_8601": "2024-01-23T19:19:54.551389Z",
            "url": "https://files.pythonhosted.org/packages/bf/3b/22a244da0f2f1496515f7dc0f48819260f0c7d7f31619baf15071c3baa6f/ar-0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 19:19:54",
    "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.16693s