Skip to main content

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:

uv run python -m unittest tests.test_shapes

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

  1. Bump version in pyproject.toml
  2. Update CHANGELOG.md
  3. Commit and tag vX.Y.Z, then push the tag
  4. 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cordra-client 0.3.0
File Size Uploaded
cordra_client-0.3.0.tar.gz 37.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cordra-client 0.3.0
File Interpreter ABI Platform
cordra_client-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 60.7 kB

Release files / cordra_client-0.3.0.tar.gz

Download URL cordra_client-0.3.0.tar.gz
Size 37.3 kB
Tags Source
SHA-256 checksum
How to use checksums
93b42be14c37ce198978757ea59751385366f2cca2f6c836429b54eb1d588a35
BLAKE2b-256 checksum
How to use checksums
563ed1f278083721603fe799fb4b39feba2263bb401ccb079bb75c866ebf24b6
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 14, 2026.

Transparency log

Release files / cordra_client-0.3.0-py3-none-any.whl

Download URL cordra_client-0.3.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ec76367aa30bfe32fb18f77263a280835c2cab057a090fafd957991f0b41658
BLAKE2b-256 checksum
How to use checksums
953928b71c2e9a7605ba755e8c5edd207674b299f82c49cbd58e768066ea9982
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 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page