1
1
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
- """High-level helper class to provide an encrypting wrapper for boto3 DynamoDB clients ."""
3
+ """High-level helper class to provide an encrypting wrapper for boto3 DynamoDB paginators ."""
4
4
from collections .abc import Callable , Generator
5
5
from copy import deepcopy
6
6
from typing import Any
@@ -45,7 +45,7 @@ def __init__(
45
45
encryption_config (DynamoDbTablesEncryptionConfig): Encryption configuration object.
46
46
expect_standard_dictionaries (Optional[bool]): Does the underlying boto3 client expect items
47
47
to be standard Python dictionaries? This should only be set to True if you are using a
48
- client obtained from a service resource or table resource (ex: `table.meta.client`).
48
+ client obtained from a service resource or table resource (ex: `` table.meta.client` `).
49
49
If this is True, EncryptedClient will expect item-like shapes to be
50
50
standard Python dictionaries (default: False).
51
51
@@ -62,24 +62,28 @@ def paginate(self, **kwargs) -> Generator[dict, None, None]:
62
62
Yield a generator that paginates through responses from DynamoDB, decrypting items.
63
63
64
64
Note:
65
- Calling `botocore.paginate.Paginator`'s `paginate` method for Query or Scan
66
- returns a `PageIterator` object, but this implementation returns a Python generator.
65
+ Calling `` botocore.paginate.Paginator`` 's `` paginate` ` method for Query or Scan
66
+ returns a `` PageIterator` ` object, but this implementation returns a Python generator.
67
67
However, you can use this generator to iterate exactly as described in the
68
68
boto3 documentation:
69
+
69
70
https://botocore.amazonaws.com/v1/documentation/api/latest/topics/paginators.html
71
+
70
72
Any other operations on this class will defer to the underlying boto3 Paginator's implementation.
71
73
72
74
Args:
73
75
**kwargs: Keyword arguments passed directly to the underlying DynamoDB paginator.
74
76
For a Scan operation, structure these arguments according to:
77
+
75
78
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/paginator/Scan.html
76
79
77
80
For a Query operation, structure these arguments according to:
81
+
78
82
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/paginator/Query.html
79
83
80
84
Returns:
81
85
Generator[dict, None, None]: A generator yielding pages as dictionaries.
82
- The items in the pages will be decrypted locally after being read from DynamoDB.
86
+ The items in the pages will be decrypted locally after being read from DynamoDB.
83
87
84
88
"""
85
89
if self ._paginator ._model .name == "Query" :
0 commit comments