cordra-client
Lean Python client for the Cordra APIs.
Distribution name: cordra-client · Import name: cordra_client ·
Python: ≥ 3.12 · License: MIT
Purpose and goals
-
Talk to Cordra over REST (legacy HTTP API) or DoIP (native TCP or DoIP-over-HTTP) behind one
protocol=switch. -
Expose a single Digital Object (DoIP) shape to callers so application code can flip transports without rewriting field access.
-
Stay close to the wire: no harvest logic, settings loaders, or other application helpers—only thin peelers (
full,Payload). -
Keep the public surface small:
from cordra_client import Cordra, Payload, CordraError
Full API reference (every method, inputs/outputs, REST↔DoIP mapping, examples): DOCUMENTATION.md.
Install
From PyPI (preferred). Pin a version, not a branch:
pip install "cordra-client[doip]==0.3.0"
Omit [doip] for REST-only (pip install cordra-client==0.3.0).
As a git dependency (alternative)
cordra-client[doip] @ git+https://github.com/KIKIRPA/cordra-client.git@v0.3.0
SSH equivalent: git+ssh://git@github.com/KIKIRPA/cordra-client.git@v0.3.0.
With uv (this repository / editable)
uv is recommended:
uv sync --all-extras
That creates .venv/ if needed and installs the project editable with the
doip extra (cnri_doip_client). Run tools via uv run ….
REST-only:
uv sync
With venv + pip
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e ".[doip]" # or: pip install -e .
requirements.txt style
cordra-client[doip]==0.3.0
Or, for a local checkout:
-e .[doip]
Runtime dependencies (also declared in pyproject.toml): requests,
requests-toolbelt; optional cnri_doip_client for DoIP.
Quick check
uv run python -c "from cordra_client import Cordra, Payload, CordraError"
Minimal usage (see DOCUMENTATION.md for the full contract):
from cordra_client import Cordra
with Cordra(
url="https://cordra.example:8443",
username="admin",
password="…",
verify=False,
protocol="rest", # or "doip" (+ doip_port / doip_base_uri)
) as client:
obj = client.create({"name": "example"}, "MyType", full=True)
# obj["id"], obj["attributes"]["content"]
Tests
Offline unit tests (no Cordra)
Digital Object shape helpers and REST write-response caps:
uv run python -m unittest tests.test_shapes tests.test_rest_response_cap
Smoke tests (live Cordra)
tests/smoke_cordra_client.py registers a
temporary LibSmokeTests type, exercises CRUD/payload/auth flows on the
selected transports, asserts the Digital Object shape, then cleans up.
Defaults: 127.0.0.1 (HTTPS 8443, DoIP 9000), user admin. Pass --host
(and ports) to point at another Cordra.
# interactive (prompts for password)
uv run tests/smoke_cordra_client.py
# non-interactive
uv run tests/smoke_cordra_client.py --password "$CORDRA_PASSWORD"
# subset of modes
uv run tests/smoke_cordra_client.py \
--password "$CORDRA_PASSWORD" \
--modes rest-password,doip-password
Modes: rest-password, rest-token, doip-password, doip-token,
doip-http-password, doip-http-token. Use --help for host/port/TLS flags.
Releases
- Bump
versioninpyproject.toml - Update
CHANGELOG.md - Commit and tag
vX.Y.Z, then push the tag - GitHub Actions runs tests, builds the sdist/wheel, and publishes to PyPI
(trusted publishing, environment
pypi)
One-time PyPI setup (before the first tag): create a Trusted Publisher for
project cordra-client, owner KIKIRPA, repository cordra-client, workflow
publish.yml, environment pypi. Do not upload with a password or API token.
Release files for cordra-client 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cordra_client-0.3.2.tar.gz | 41.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cordra_client-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.0 kB
Release files / cordra_client-0.3.2.tar.gz
| Download URL | cordra_client-0.3.2.tar.gz |
|---|---|
| Size | 41.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd1e90a99ca9e2ad264844067d17c6433bc32a5b93c65f9907e4b0520aec782e
|
|
BLAKE2b-256 checksum How to use checksums |
c4c4752d38d13a5f623dc713c88b1e36f5208a6503e8d5322dac863092749aac
|
| 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 Sep 24, 2026.
Transparency logRelease files / cordra_client-0.3.2-py3-none-any.whl
| Download URL | cordra_client-0.3.2-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c870cf57cd6e540915dba71906e81bf34aac4213b2ef31a87dae0c42cd79f16c
|
|
BLAKE2b-256 checksum How to use checksums |
e45dcbfcb7b36780602c4566c4cd804cad571b3eaca4418b926a689905b7fe41
|
| 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 Sep 24, 2026.
Transparency log