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

Uploaded Python 3

File details

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

File metadata

  • Download URL: claims_retry-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5108a683f08578fcbf6dfba1fe9beb507dadf35db7e141160a970054bc34c0ce
MD5 c47c4af9d496cb2a297c0f7617c16993
BLAKE2b-256 2852ac62fb31bdd12c167f172613cf928621e315d18c3fb79602ad3895223d57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claims_retry-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4daebd5ac90de3e22c901858714d52af44337880878f055ef5d9edd0a8156e1e
MD5 9cc9096ae77a13438bbf527eb52ee203
BLAKE2b-256 ee121e2d43355e50913f3cec6dd5e4bac6df3130f413b2cfe5bbacacc70a88e3

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