xrdcore
The small, dependency-free core shared by xrdclient, xgfalclient and xrdarc. Nothing protocol-specific lives here, and nothing that needs a third-party package to import.
| Module | What it is |
|---|---|
xrdcore.safexml |
fromstring() that refuses every <!DOCTYPE, so no entity can be declared, expanded or fetched (UnsafeXML). |
xrdcore.checksum |
new("adler32"), checksum_bytes, checksum_file, algorithms(): one incremental, hashlib-shaped surface over Adler-32, CRC-32, CRC-32C, CRC-64/XZ, CRC-64/NVME, MD5 and the SHAs. |
xrdcore.crc32c |
CRC-32C, hardware-assisted with the fast extra (google-crc32c), else crc32c_py. |
xrdcore.crc64 |
CRC-64/XZ and CRC-64/NVME, pure Python. |
xrdcore.log |
redact() and get_logger(): credential redaction for logs and terminals, and per-level mute(); configure() and verbosity_level(), a command-line tool's -v handler with that redaction. |
xrdcore.cancel |
CancelScope (context-variable cancellation) and watching() (cancel hooks). |
xrdcore.pipeline |
pump() and ReadAhead: the bounded, read-ahead byte pump every streamed copy ends in. |
xrdcore.retry |
delay()/pause(): the one exponential, capped, deadline-aware, full-jitter backoff; retry_after() reads HTTP Retry-After in both spellings. |
xrdcore.report |
The versioned storage-client-report document behind every tool's --json/--xml; parse() reads either format back as the one JSON tree. |
xrdcore.errors |
The exception vocabulary xrdcore, xrdsec and xrdhttp raise. Clients join it: a client's same-meaning names are these classes (xrdclient.XRootDError is XrdError), and its own errors subclass them, by multiple inheritance where they are also a builtin. |
xrdcore.fanout |
run_all(): jobs run side by side on threads, the first failure raised as itself (the rest noted on it), queued jobs never started and running ones told to stop (Stopped); each job sees the caller's contextvars. Pool: a long-lived, named pool for work that is not a fan-out, made on first use and again after a fork. |
xrdcore.sockets |
recv_exact(): exactly N bytes from a framed stream socket, or ShortRead (an OSError) saying how far it got. |
xrdcore.cli |
ExitCode, the exit statuses every tool shares (0, 1, 2, 70, 130, 141), extends() for a tool's own table, run() (Ctrl-C → 130, a closed pipe → a quiet 141), Fatal (any other failure: one redacted prog: message line, its status from the tool's exit_code() table, a bug's traceback at DEBUG) and silence_stdout(). |
import xrdcore imports no submodule; each loads when first named.
from xrdcore import checksum, safexml
digest = checksum.new("adler32")
digest.update(b"hello world\n")
digest.hexdigest() # '1e720467'
safexml.fromstring(b"<!DOCTYPE x><x/>") # raises UnsafeXML
Development
In the workspace every package is installed editable into the shared interpreter, so the tests import the source tree. On a fresh checkout:
cd xrdcore
python -m pip install -e '.[dev,fast]'
python -m pytest -q -n 6 --cov=xrdcore # 100 % line + branch, enforced (fail_under)
ruff check src tests && ruff format --check src tests
mypy # strict, over src and tests
complexipy # no function above 15, no snapshot
python -m build && twine check dist/* # the wheel ships py.typed
Without the fast extra the CRC-32C tests still pass: they cover the
pure-Python path, and the accelerated one through a stand-in module.
Licence
LGPL-3.0-or-later; see LICENSE and COPYING.
Metadata
Release files for xrdcore 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xrdcore-0.4.0.tar.gz | 95.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xrdcore-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 163.1 kB
Release files / xrdcore-0.4.0.tar.gz
| Download URL | xrdcore-0.4.0.tar.gz |
|---|---|
| Size | 95.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42081d969a9db1a780614242c21da802f745bb58fb0baf45830842f435222572
|
|
BLAKE2b-256 checksum How to use checksums |
dbf097b94556da32cd39b1c08ba22783cb5d6aa19d8ef5bd3ea26eb50e81f2df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / xrdcore-0.4.0-py3-none-any.whl
| Download URL | xrdcore-0.4.0-py3-none-any.whl |
|---|---|
| Size | 67.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5929988302afe00aac9092197e7e35241088e025b600bc15673dbfd7c5686a18
|
|
BLAKE2b-256 checksum How to use checksums |
dc0044d780a91dc67b1d6a93dde0ce62f137f5dcca22ba59382c8861a9544eb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency log