Skip to main content

Registry Relay client for Python

This package is the thin synchronous Python binding for registry-relay-client. It performs one bounded Relay SDK exchange per method; a configured private-key-JWT provider may perform a separate token acquisition or refresh exchange. The binding does not implement HTTP routing, authentication, retries, pagination, or Relay Problem Details itself.

Starting with Registry Stack v0.22.0, install the exact client version that matches the Relay deployment:

python -m pip install "registry-relay-client==<version>"

PyPI carries manylinux wheels requiring glibc 2.17 or newer for Linux amd64 and Linux arm64, plus a macOS arm64 wheel. Registry Stack v0.20.0 and v0.20.1 remain available only as wheels attached to their GitHub Releases.

from registry_relay_client import RelayClient

client = RelayClient(base_url="https://relay.example")
result = client.service_metadata()
if result["kind"] == "complete":
    print(result["value"]["name"])

Authentication uses an exactly-one-key wrapper. Supply a static bearer as:

client = RelayClient(
    base_url="https://relay.example/prefix",
    authorization={"static": short_lived_token},
)

Private-key JWT uses the alternative wrapper member:

client = RelayClient(
    base_url="https://relay.example/prefix",
    authorization={
        "private_key_jwt": {
            "token_endpoint": "https://issuer.example/oauth/token",
            "client_id": "relying-party",
            "client_key": private_jwk,
        }
    },
)

Top-level trusted_root_certificates configures the Relay deployment connection. A token endpoint using a private CA needs its own byte-valued trusted_root_certificates inside private_key_jwt; the two trust inputs are deliberately independent.

The built-in private-key-JWT flow sends only grant_type, client_assertion_type, and client_assertion. It does not send scope, resource, a body client_id, or deployment-defined form members. When an issuer requires any of those fields, acquire a short-lived bearer separately and pass it through authorization={"static": token}.

Every method is blocking and releases the Python GIL while the private current-thread Tokio runtime waits for I/O. Conditional methods return a plain mapping discriminated by kind: either complete with value, trace_id, and optional etag, or not_modified with trace_id and etag. Page results also carry a plain continuation, which only the matching continuation method accepts. Raw OpenAPI, artifact, and SDMX bodies are returned as bytes. The PEP 561 stub types fixed service, capability, resource, Record envelope, page, and outcome structures while keeping deployment-defined domainData as JSON values.

List and search requests follow their distinct Relay contracts. A list accepts optional equality filters and never accepts bbox. A named search requires a four-number bbox ordered as west, south, east, north. The bbox must be a concrete Python list or a four-item tuple; other sequence implementations are rejected. Search never accepts filters:

listed = client.list_records("people", filters={"status": "active"})
nearby = client.search("people", "nearby", bbox=[100.0, 13.0, 101.0, 14.0])

The client validates these shapes before performing a Relay exchange.

Build and test from the workspace root:

cargo build --locked -p registry-relay-client-py --lib \
  --features registry-relay-client-py/extension-module
python3 -m unittest discover -s crates/registry-relay-client-py/tests/python -v

Release files for registry-relay-client 0.26.0

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

Built distributions (wheels)

Table of built distributions (wheels) for registry-relay-client 0.26.0
File Interpreter ABI Platform
registry_relay_client-0.26.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
registry_relay_client-0.26.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
registry_relay_client-0.26.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 8.9 MB

Release files / registry_relay_client-0.26.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL registry_relay_client-0.26.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0a7910c82685ee3375dea127e2bfffc8c3728a9c79b9c9b4d1eede3d733156cf
BLAKE2b-256 checksum
How to use checksums
15c0f8e9d4cc23cdfc90ab820a2de70841cf585b2c054a7d9345bb4c6873b445
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 4, 2026.

Transparency log

Release files / registry_relay_client-0.26.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL registry_relay_client-0.26.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.9 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
08e61474c5d4b2c40dd90a6ebcd8c5a8e09fd27f6adb3c96dc40391367338384
BLAKE2b-256 checksum
How to use checksums
9e6620e532c1b3a66230037e5b8b4227a9380b3a61904cada8fa7815d628c623
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 4, 2026.

Transparency log

Release files / registry_relay_client-0.26.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL registry_relay_client-0.26.0-cp310-abi3-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
67d1f1e35a21d18ceec6ec919207c2cb56d6d87d912a894368ef6e2187f5cddf
BLAKE2b-256 checksum
How to use checksums
26dfc301a11c01be7cdcb5f83ee4f12c601066ab045238d14a9f3a8a677ffba3
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 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.26.0 This release

3 release files

0.25.0

3 release files

0.24.0

3 release files

0.23.0

3 release files

0.22.0

3 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