Assorted tar related things, including a fast tar-based copy.
Latest release 20240318: Initial PyPI release with nice traced_cpdir() function.
My most heavily used use for this is my cpdir script which
does a high performance directory copy by piping 2 tars
together.
It runs this:
from cs.tarutils import traced_cpdir
sys.exit(traced_cpdir(*sys.argv[1:]))
Function tar(*srcpaths: List[str], chdirpath='.', output, tar_exe='tar', bcount=2048)
Tar up the contents of srcpaths to output.
Return the Popen object for the tar command.
Parameters:
srcpaths: source filesystem pathschdirpath: optional directory to which tochdirbefore accessingsrcpathstar_exe: optionaltarexecutable, default fromTAR_EXE:tarbcount: blocking factor in 512 byte unites, default fromDEFAULT_BCOUNT:2048
Function traced_cpdir(srcdirpath, dstdirpath, *, label=None, tar_exe='tar', bcount=2048, upd)
Copy a directory to a new place using piped tars with progress reporting.
Return 0 if both tars succeed, nonzero otherwise.
Parameters:
srcdirpath: the source directory filesystem pathdstdirpath: the destination directory filesystem path, which must not already existlabel: optional label for the progress bartar_exe: optionaltarexecutable, default fromTAR_EXE:tarbcount: blocking factor in 512 byte unites, default fromDEFAULT_BCOUNT:2048
Function traced_untar(tarfd, *, chdirpath='.', label=None, tar_exe='tar', bcount=2048, total=None, _stat_fd=False, upd)
Read tar data from tarfd and extract.
Return the tar exit code.
Parameters:
tarfd: the source tar data, suitable forsubprocess.Popen'sstdinparameterchdirpath: optional directory to which tochdirbefore accessingsrcpathslabel: optional label for the progress bartar_exe: optionaltarexecutable, default fromTAR_EXE:tarbcount: blocking factor in 512 byte unites, default fromDEFAULT_BCOUNT:2048
Release Log
Release 20240318: Initial PyPI release with nice traced_cpdir() function.
Metadata
Release files for cs-tarutils 20240318
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cs.tarutils-20240318.tar.gz | 5.2 kB | Without provenance | Details for cs.tarutils-20240318.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cs.tarutils-20240318-py3-none-any.whl | Python 3 | none | any | Details for cs.tarutils-20240318-py3-none-any.whl |
Total release size: 10.6 kB
Release files / cs.tarutils-20240318.tar.gz
| Download URL | cs.tarutils-20240318.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94970061d5dae7d4894a808082e5d8e36e64a357ddb4c914b0174fbbb6e255e9
|
|
BLAKE2b-256 checksum How to use checksums |
5712f48e1201bbb7923a18b4f22b4be4d99297c152979f97bbb5d73d71a6483c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.6
|
Release files / cs.tarutils-20240318-py3-none-any.whl
| Download URL | cs.tarutils-20240318-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6829df016051a16e4cefd9b39a4edff35b3e88585f70081b4995b75567b25180
|
|
BLAKE2b-256 checksum How to use checksums |
4c17c20665757b8d3253b64bd55313ef638a51f5a2ec939a7cc06ff86855bef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.6
|
Security for cs-tarutils 20240318
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.