Skip to content

Add amazon-documentdb-python-client to new developer/ directory#188

Open
cod-all wants to merge 1 commit into
awslabs:masterfrom
cod-all:developer-python-client
Open

Add amazon-documentdb-python-client to new developer/ directory#188
cod-all wants to merge 1 commit into
awslabs:masterfrom
cod-all:developer-python-client

Conversation

@cod-all

@cod-all cod-all commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Adds a Python wrapper library for PyMongo that enforces Amazon DocumentDB best practices automatically. This is the first contribution to a new developer/ directory for libraries and SDKs that help developers build applications on DocumentDB.

The library has two layers:

  1. Safe defaults - enforced at MongoClient construction (TLS, replica set, pool sizing, timeouts)
  2. Plugin chain - composable middleware for retry, telemetry, and custom logic without modifying application code

...and provides the following:

Description
Connection management singleton client with pre-warmed pool (min_pool_size=5)
Replica-set routing enforces replicaSet=rs0 and directConnection=False
Read distribution defaults to secondaryPreferred
Retry with backoff plugin-based exponential retry with jitter (reads by default, opt-in for idempotent writes)
Telemetry per-service, per-command CloudWatch metrics
Connection tracking proactively closes stale connections on topology changes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Python wrapper library for PyMongo that enforces Amazon DocumentDB best
practices automatically: replica-set routing, connection pooling, retry
with exponential backoff, per-service CloudWatch telemetry, and IAM
authentication support.

Includes:
- Core library (src/docdb/) with plugin-based middleware architecture
- Documentation covering overview, plugins, retry, telemetry, IAM auth,
  and connection tracking
- Seven runnable examples (basic, Flask, FastAPI, Lambda, telemetry,
  custom plugin, IAM auth)

Licensed under Apache-2.0 consistent with the parent repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant