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.3.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.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claims_retry-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 d97a3941922ccf2ca0fc5c5d157bd44c9dc6e0d75b4969e87478d29bc60e361a
MD5 67bfc1645caeb5a66f984a586be3cc56
BLAKE2b-256 30c9e65054fbf61f8e4e3ed11f67a0dd70001a4cab357df66056578a00bababb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claims_retry-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ac3cf446ee5a166e59c3942684b7569ed1bb18d83fe2b4c588acf711bdc992d0
MD5 7041db785594c2d1a2c76df269e2da7b
BLAKE2b-256 0d4e27b0c51c515bfdf2f2f70762be6932c0f15b185e81155a4780c1b5953a80

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