Python client for Relayed, a webhook delivery service
Project description
Relayed
A Python Client for Relayed, a Webhooks Delivery Service.
Installation
pip install relayed
Quick start
import uuid
from relayed import RelayedClient, RelayedClientError
client = RelayedClient(
api_key="your-api-key",
base_url="https://relayed.example.com",
)
subscription = client.create_subscription(
destination_url="https://example.com",
event_types=["invoice.paid", "invoice.unpaid"],
description="Subscription for a contractor to send webhook whether customer paid the invoice"
)
try:
response = client.send_event(
event_type="invoice.paid",
payload={"invoice_id": "inv_123", "amount": 4200},
idempotency_key=str(uuid.uuid4()), # use a stable value across retries
)
print(response) # {"event_id": "...", "delivery_ids": [...]}
except RelayedClientError as e:
print(f"Cannot send event: {e}")
Error Handling
All errors raised by the SDK inherit from RelayedError, so you can catch everything with a single except clause, or catch specific subclasses for fine-grained handling.
from relayed import (
RelayedError,
RelayedAuthError,
RelayedNotFoundError,
RelayedConflictError,
RelayedClientError,
RelayedServerError,
)
Links
- Source: Github URL
- Issues: GitHub issues URL
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relayed-0.0.3.tar.gz.
File metadata
- Download URL: relayed-0.0.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d0e402ffeb8d993560b3cd7cf9aeed1e17e4e56290bb3b7b847af8d757f7a5e
|
|
| MD5 |
f21fe0c8d3533a6716fa0f630b7573cb
|
|
| BLAKE2b-256 |
cbb66e328ac118779ca7e0a1acff8a7301e2034bac77af7aafd1a5a585abae1a
|
Provenance
The following attestation bundles were made for relayed-0.0.3.tar.gz:
Publisher:
publish-to-pypi.yml on JoeCosta7/Relayed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relayed-0.0.3.tar.gz -
Subject digest:
1d0e402ffeb8d993560b3cd7cf9aeed1e17e4e56290bb3b7b847af8d757f7a5e - Sigstore transparency entry: 2037785184
- Sigstore integration time:
-
Permalink:
JoeCosta7/Relayed@2670744f7b9a74ffc12f416ee871f2074c6f6e07 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/JoeCosta7
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@2670744f7b9a74ffc12f416ee871f2074c6f6e07 -
Trigger Event:
push
-
Statement type:
File details
Details for the file relayed-0.0.3-py3-none-any.whl.
File metadata
- Download URL: relayed-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab6bbd9440abd131e7ac0272697701113bcfbc652280a0e4083e97f4b4f3344
|
|
| MD5 |
4926e6a05381a9c1ea910cea932d1c72
|
|
| BLAKE2b-256 |
edd2bb13d749e2a0f933c23a6ba57e8821a391ee606aa54b1d3ab24f4622f535
|
Provenance
The following attestation bundles were made for relayed-0.0.3-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on JoeCosta7/Relayed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relayed-0.0.3-py3-none-any.whl -
Subject digest:
5ab6bbd9440abd131e7ac0272697701113bcfbc652280a0e4083e97f4b4f3344 - Sigstore transparency entry: 2037785367
- Sigstore integration time:
-
Permalink:
JoeCosta7/Relayed@2670744f7b9a74ffc12f416ee871f2074c6f6e07 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/JoeCosta7
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@2670744f7b9a74ffc12f416ee871f2074c6f6e07 -
Trigger Event:
push
-
Statement type: