Skip to content

jochenparm/dephell_archive

 
 

Repository files navigation

DepHell Archive

travis appveyor MIT License

Module to work with files and directories in archive in pathlib style.

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

Installation

Install from PyPI:

python3 -m pip install --user dephell_archive

Usage

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()

About

Pathlib for archives

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%