Skip to main content

Retry decorator for DynamoDB claim status updates

Project description

claims-retry Library

A minimal standalone Python library demonstrating ONE advanced programming construct (a decorator) to make DynamoDB operations more robust via retry with exponential backoff.

Exposed Functions

  • update_claim_status(claim_id, new_status): Updates a claim's status with automatic retry on transient throttling errors.

Advanced Construct

  • Decorator with_retry(...) wraps a function and transparently retries specific DynamoDB transient error codes using exponential backoff + jitter.

Usage

Set environment variables:

export CLAIMS_TABLE=Claims
export AWS_REGION=eu-west-1

Install (local path example):

pip install -e ./claims_retry_lib

Call:

from claims_retry import update_claim_status, with_retry
update_claim_status("1234-uuid", "APPROVED")

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

claims_retry-0.1.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

claims_retry-0.1.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file claims_retry-0.1.4.tar.gz.

File metadata

  • Download URL: claims_retry-0.1.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for claims_retry-0.1.4.tar.gz
Algorithm Hash digest
SHA256 89a42dbe8571fcc45c483993b42dcca13b9049934937bd9a64136f88cbd1ab57
MD5 7bb2830f841eea77ea72d2d60d3eee76
BLAKE2b-256 eed7df33e00c3be26e010c8ffa6abfc2405175301f0796e47236adae451af6f3

See more details on using hashes here.

File details

Details for the file claims_retry-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: claims_retry-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for claims_retry-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0a9a047a2c3c5bb2e8144c2ce2790b1fa4ee7c6d7b4aa49189e89602123b1ac6
MD5 a09956b55e50b4cb6bc1a56a725e01d7
BLAKE2b-256 c51a165a8db3ae78c6c667881d98524706cead2f56a8e0bffdad1feab93da974

See more details on using hashes here.

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