Skip to content

sdk-python-v0.5.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 06:03
· 112 commits to main since this release
29a89d4

Added

  • verify_signature(headers, body, secrets, *, tolerance_seconds=300, now=None)
    verifies the Standard Webhooks signature an HTTP sink with a secret adds,
    comparing in constant time; failures raise InvalidSignatureError (code,
    field, retryable=False).
  • message.Message, message.decode_message(), and message.InvalidMessageError
    (with code, field and retryable=False): decode and validate the v1
    queue message every sink delivers — the inline (body_base64) and
    claim-check (claim) body forms, sha256, dedupe_key, replay_id, and
    the forwarded headers, ignoring unknown keys.
  • message.idempotency_key(), the key to store in a processed-ids table: the
    key Ankusa shipped (the message's idempotency_key, or the
    x-ankusa-idempotency-key header), and for a message or delivery that
    predates the field tenant:source_id:dedupe_key (tenant default when there
    is none) when dedupe_key is set, else id, with an optional
    #replay:<replay_id> suffix (include_replay=True).
  • Message.idempotency_key, decoded like replay_id, and
    HookHeaders.dedupe_key / HookHeaders.replay_id /
    HookHeaders.idempotency_key, parsed from x-ankusa-dedupe-key /
    x-ankusa-replay-id / x-ankusa-idempotency-key.
  • AdminClient.create_replay(), get_replay(), list_replays() and
    update_replay() for the POST/GET/PATCH /v1/replays replay-job API (kinds
    dlq, archive, quarantine).

Changed

  • ClaimCheckClient.redeem() raises ClaimCheckUnavailableError (retryable)
    for a gateway 408 or 429 instead of ClaimRejectedError.

Removed

  • AdminClient.replay_dead_letters(), replaced by the replay-job API above.
    POST /v1/dlq/replay no longer exists.