Skip to main content

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

Metadata

Release files for copytrav 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for copytrav 0.0.5
File Size Uploaded
copytrav-0.0.5.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for copytrav 0.0.5
File Interpreter ABI Platform
copytrav-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / copytrav-0.0.5.tar.gz

Download URL copytrav-0.0.5.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
211b905132fe338ce1cb33c9866c7904f0a20f7eb71421f9e3a7f95dc3a35516
BLAKE2b-256 checksum
How to use checksums
8f7f8b86fe55c8945df2792835980ddc1ca169a5b5c8d9c790846df0f30dc403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Release files / copytrav-0.0.5-py3-none-any.whl

Download URL copytrav-0.0.5-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a866221d47aed7d0f6cff3664379ca1018952e57508beb4fe537749bd3505234
BLAKE2b-256 checksum
How to use checksums
b4b58b2266bd923b835c88cc747bf7d60c4e3203ff2d0d1410094e8a2c91d642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page