Skip to main content

Copy traversables as directories.

Project description

copytrav

Copying Python Traversals

Modern Python packaging has support for data files to be included with the package alongside source files. There are many times when you might want to have copies of these files on disk, often when being used with external or third-party programs, and this is the role copytrav fills. You may, of course, use importlib.resources.as_file(traversable), but there are still other times when a context manager isn't good enough.

Users

Installation

pip install copytrav

Usage

Copying a Directory

from copytrav import copy

copy("mymodule.data", "path/to_directory", "output_path")

Copying a File

from copytrav import copy

copy("mymodule.data", "path/to_file", "output_path")

Copy the Whole Module

from copytrav import copy

copy("mymodule.data", dst="output_path")

Copy the Whole Module into a TempDir

from copytrav import copy

tempdir = copy("mymodule.data")

Building the Documentation

clone the repository

pip install -e .[dev]

cd docs && make html

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

copytrav-0.0.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

copytrav-0.0.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file copytrav-0.0.4.tar.gz.

File metadata

  • Download URL: copytrav-0.0.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for copytrav-0.0.4.tar.gz
Algorithm Hash digest
SHA256 05f10ce4bf08c943b8ef26234f1118660893a1f36f503345d5454dfa52530363
MD5 747d3a311f8dc021e2fe9eb268d93422
BLAKE2b-256 f1033280b27ab00c0af19666cbd984ad9474c008dc4cbe718c7333d601e0f1fb

See more details on using hashes here.

File details

Details for the file copytrav-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: copytrav-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for copytrav-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e91a4219c223446cad6ac5c69aca7ea1f254e7f6a2fae4d86da5f64f83bbdeb0
MD5 e8aa77e1c2a2dcae589ed225b9d07015
BLAKE2b-256 a19dcb373ea26576acd01084a986230afd5d8fcb56554cfc39462a6c481b8a46

See more details on using hashes here.

Supported by

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