Skip to main content

pathlib for archives

Project description

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

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

dephell-archive-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file dephell-archive-0.1.2.tar.gz.

File metadata

  • Download URL: dephell-archive-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0

File hashes

Hashes for dephell-archive-0.1.2.tar.gz
Algorithm Hash digest
SHA256 52cb4ce2c9c747e3f3a875b3e874f83c7604af198910442f099eab1c058fb163
MD5 07ee83f8642afd336e3a94d360356f85
BLAKE2b-256 0fd012b6e350569f9377d35dd41fb95241faab6408816d062168eb49109fe756

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page