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")

Why This Satisfies LO3

  • Introduces abstraction and reusability (decorator pattern).
  • Enhances robustness & scalability (handles throttling gracefully).
  • Keeps codebase clean; view code calls a single function instead of embedding retry logic.

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.1.tar.gz (3.1 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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claims_retry-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 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.1.tar.gz
Algorithm Hash digest
SHA256 ffe0cd62e97164a6e52a8f0fa75683f11a0b269b2bba25decd905b7ec3c692bd
MD5 9a8f2858d50a28ee4516bc4581d38087
BLAKE2b-256 d288547ff7090878c076097f2ff807f806ea3ec390e301e2539fafe2f92d08d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claims_retry-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc94b4a5bc7d5d6b2df873bb575775341d6d321d7852ad0de2f5585024c26d25
MD5 9883dfd9c15bfa8dab4d9f4adcc56bd2
BLAKE2b-256 f24f996b64276cc29089e040fd4414ecae14cc54b1553638249d753d21eefdc1

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