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)
| File | Size | Uploaded | |
|---|---|---|---|
| copytrav-0.0.5.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|