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

Uploaded Python 3

File details

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

File metadata

  • Download URL: claims_retry-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 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.0.tar.gz
Algorithm Hash digest
SHA256 c3954d3126ee4b6fd18dcb504b7ad71383a155d8af76a625bca64c2ed3765da5
MD5 ca7b859916f49c70419e87706b8e787c
BLAKE2b-256 e0cc44297b9b7438b93ffaf4f134bbe0761913058f6bec301bd67331e900529d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claims_retry-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1645c758f468cd11de3ea5488f28e0440cc1ea74a71524a6ed1aa640a346551
MD5 9f3d8652a2f4a4edc1924b4c8eca4ce8
BLAKE2b-256 ddd572d85f7fe7073b3b6ec9ef3a8a95af3da48507b3c743dd27d9346da2d759

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