Batch Read
Multiple GetItem calls in a single request. Auto-chunks at 100 keys, retries unprocessed keys with exponential backoff.
Basic Usage
items = orders.batch_read([
{"user_id": "usr_1", "order_id": "ord_1"},
{"user_id": "usr_2", "order_id": "ord_2"},
{"user_id": "usr_3", "order_id": "ord_3"},
])
# Returns: [dict, dict, None]
# - Results are in the same order as the input keys
# - Items not found are returned as None
With Projection and Consistent Read
items = orders.batch_read(
[{"user_id": "usr_1", "order_id": "ord_1"}],
select=["total", "status"],
consistent=True,
)
info
Batch read automatically chunks at 100 keys (DynamoDB limit) and retries unprocessed keys with exponential backoff.