Skip to main content

Client library for the pulsar-relay HTTP wire contract (auth, transport, device flow, topic management)

Project description

pulsar-relay-client

Python client for the pulsar-relay HTTP wire contract.

Used by:

  • the Pulsar daemon's relay subscriber/auth layer
  • Galaxy's BYOC (Bring-Your-Own-Compute) Pulsar manager
  • pulsar-relay's own end-to-end tests

The package is the single source of truth for the relay wire contract; the server (pulsar-relay) and the client (pulsar-relay-client) version independently. A new client version that knows about a new wire feature bumps the minor version; breaking changes bump major.

Modules

Module Public surface
pulsar_relay_client.auth RelayAuthManager, PasswordAuthenticator, RefreshTokenAuthenticator, RelayAuthError
pulsar_relay_client.credentials CredentialsFile, InMemoryCredentialsStore, utcnow_iso
pulsar_relay_client.device_flow RelayDeviceFlowAuthenticator, DeviceFlowError (RFC 8628 + the pair=true extension)
pulsar_relay_client.transport RelayTransport, RelayTransportError (HTTP + auth + cursor persistence)
pulsar_relay_client.topics HttpRelayClient with create_or_verify_topic, the RelayClient Protocol (caller-facing typing surface), and the relay-error hierarchy. Topic naming conventions are the caller's concern.
pulsar_relay_client.testing FakeRelayClient — in-memory implementation of the RelayClient Protocol for consumers writing tests against a fake.

Installation

pip install pulsar-relay-client

Quick start

from pulsar_relay_client import RelayTransport

transport = RelayTransport(
    "https://relay.example.org",
    credentials_file="/etc/pulsar/relay_credentials.json",
    cursor_path="/var/lib/pulsar/relay_cursor.json",
)
transport.post_message("job_status_update_my_manager", {"job_id": "j1", "state": "ok"})
messages = transport.long_poll(["job_setup_my_manager"], timeout=30)

Versioning

  • 1.0.0 — first standalone release. Wire features: device-flow with pair=true, chain-scoped revocation, topic create-or-verify-ownership, refresh-token rotation with InMemoryCredentialsStore callback.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulsar_relay_client-0.2.2.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulsar_relay_client-0.2.2-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file pulsar_relay_client-0.2.2.tar.gz.

File metadata

  • Download URL: pulsar_relay_client-0.2.2.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pulsar_relay_client-0.2.2.tar.gz
Algorithm Hash digest
SHA256 0e7ea1a5c2f2028a47f7c3364ce4b83458041edf35e8eb9816dd05a7efa4479f
MD5 849fdc267b5a30e537cebb14e1e929ff
BLAKE2b-256 3850a6327fec07610fb2d06d2235658affc06931634caf834e195201637ff6ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulsar_relay_client-0.2.2.tar.gz:

Publisher: release-client.yml on mvdbeek/pulsar-relay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulsar_relay_client-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pulsar_relay_client-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fdf136cde4e9ce456abaf852690717116d372c7bd346c6b588b21d4d39f117f
MD5 5c0c1b949be9cba0e84392f97cb1f65a
BLAKE2b-256 a093f7970157d60ef2f047810c73685f8227d9e7eab9d93a953db9c58370e028

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulsar_relay_client-0.2.2-py3-none-any.whl:

Publisher: release-client.yml on mvdbeek/pulsar-relay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page