Assorted tar related things, including a fast tar-based copy.
Latest release 20260531: Update because an IterableQueue no longer has a .open() method.
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:]))
Short summary:
tar: Tar up the contents ofsrcpathstooutput. Return thePopenobject for thetarcommand.traced_cpdir: Copy a directory to a new place using piped tars with progress reporting. Return0if both tars succeed, nonzero otherwise.traced_untar: Read tar data fromtarfdand extract. Return thetarexit code.
Module contents:
-
tar(*srcpaths: List[str], chdirpath='.', output, tar_exe='tar', bcount=2048): Tar up the contents ofsrcpathstooutput. Return thePopenobject for thetarcommand.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
-
traced_cpdir(*a, upd: Optional[cs.upd.Upd] = <function uses_upd.<locals>.<lambda> at 0x10b0b7920>, **kw): Copy a directory to a new place using piped tars with progress reporting. Return0if 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
-
traced_untar(*a, upd: Optional[cs.upd.Upd] = <function uses_upd.<locals>.<lambda> at 0x10b0b7560>, **kw): Read tar data fromtarfdand extract. Return thetarexit 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 20260531: Update because an IterableQueue no longer has a .open() method.
Release 20240318: Initial PyPI release with nice traced_cpdir() function.
Metadata
Release files for cs-tarutils 20260531
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-20260531.tar.gz | 4.7 kB | Without provenance | Details for cs_tarutils-20260531.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cs_tarutils-20260531-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for cs_tarutils-20260531-py2.py3-none-any.whl |
Total release size: 10.1 kB
Release files / cs_tarutils-20260531.tar.gz
| Download URL | cs_tarutils-20260531.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6855e4d5084e3512ab40a340b416d3b03bc19de9b02cd7996838b5fa2ff4e8e2
|
|
BLAKE2b-256 checksum How to use checksums |
51f660503906a4f9dd46f71cbe883fb2791d0dc21d5c99cf6f3f65bb4efdc050
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / cs_tarutils-20260531-py2.py3-none-any.whl
| Download URL | cs_tarutils-20260531-py2.py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a0890f523d479e2102f2d2ac02b4faa261a52a6e0640b89c947af6a4675bbcfa
|
|
BLAKE2b-256 checksum How to use checksums |
14b2b4983e60664cbdeb9b8b3139c838c44873057ae3037036c0495b5f60c820
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for cs-tarutils 20260531
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.