Metadata-Version: 2.1
Name: dephell-archive
Version: 0.1.7
Summary: pathlib for archives
Project-URL: Repository, https://github.com/dephell/dephell_archive
Author: Gram
Author-email: gram@orsinium.dev
License: MIT
Requires-Python: >=3.6
Keywords: dephell,pathlib,archive,tar,zip,wheel,sdist
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Archiving
Classifier: Topic :: System :: Filesystems
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix


DepHell Archive
===============


.. image:: https://travis-ci.org/dephell/dephell_archive.svg?branch=master
   :target: https://travis-ci.org/dephell/dephell_archive
   :alt: travis


.. image:: https://ci.appveyor.com/api/projects/status/github/dephell/dephell_archive?svg=true
   :target: https://ci.appveyor.com/project/orsinium/dephell-archive
   :alt: appveyor


.. image:: https://img.shields.io/pypi/l/dephell-archive.svg
   :target: https://github.com/dephell/dephell_archive/blob/master/LICENSE
   :alt: MIT License


Module to work with files and directories in archive in `pathlib <https://docs.python.org/3/library/pathlib.html>`_ style.


* **Goal:** provide the same interface as ``pathlib.Path`` for archives.
* **State:** partially implemented. Need to implement more methods.

Installation
------------

Install from `PyPI <https://pypi.org/project/dephell-archive/>`_\ :

.. code-block:: bash

   python3 -m pip install --user dephell_archive

Usage
-----

.. code-block:: python

   from pathlib import Path
   from tempfile import TemporaryDirectory

   from dephell_archive import ArchivePath

   with TemporaryDirectory() as cache:
     path = ArchivePath(
       archive_path=Path('tests', 'requirements', 'wheel.whl'),
       cache_path=Path(cache),
     )
     subpath = path / 'dephell' / '__init__.py'
     with subpath.open() as stream:
       content = stream.read()
