mypy-boto3-dynamodb 1.34.148__py3-none-any.whl → 1.35.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mypy_boto3_dynamodb/__init__.py +2 -0
- mypy_boto3_dynamodb/__main__.py +4 -4
- mypy_boto3_dynamodb/client.py +135 -341
- mypy_boto3_dynamodb/client.pyi +134 -341
- mypy_boto3_dynamodb/literals.py +5 -1
- mypy_boto3_dynamodb/literals.pyi +3 -1
- mypy_boto3_dynamodb/paginator.py +19 -55
- mypy_boto3_dynamodb/paginator.pyi +17 -60
- mypy_boto3_dynamodb/service_resource.py +31 -152
- mypy_boto3_dynamodb/service_resource.pyi +30 -153
- mypy_boto3_dynamodb/type_defs.py +32 -49
- mypy_boto3_dynamodb/type_defs.pyi +31 -49
- mypy_boto3_dynamodb/version.py +1 -1
- mypy_boto3_dynamodb/waiter.py +14 -3
- mypy_boto3_dynamodb/waiter.pyi +13 -5
- {mypy_boto3_dynamodb-1.34.148.dist-info → mypy_boto3_dynamodb-1.35.15.dist-info}/METADATA +8 -9
- mypy_boto3_dynamodb-1.35.15.dist-info/RECORD +22 -0
- {mypy_boto3_dynamodb-1.34.148.dist-info → mypy_boto3_dynamodb-1.35.15.dist-info}/WHEEL +1 -1
- mypy_boto3_dynamodb-1.34.148.dist-info/RECORD +0 -22
- {mypy_boto3_dynamodb-1.34.148.dist-info → mypy_boto3_dynamodb-1.35.15.dist-info}/LICENSE +0 -0
- {mypy_boto3_dynamodb-1.34.148.dist-info → mypy_boto3_dynamodb-1.35.15.dist-info}/top_level.txt +0 -0
mypy_boto3_dynamodb/literals.py
CHANGED
|
@@ -19,6 +19,7 @@ if sys.version_info >= (3, 12):
|
|
|
19
19
|
else:
|
|
20
20
|
from typing_extensions import Literal
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
__all__ = (
|
|
23
24
|
"ApproximateCreationDateTimePrecisionType",
|
|
24
25
|
"AttributeActionType",
|
|
@@ -74,6 +75,7 @@ __all__ = (
|
|
|
74
75
|
"RegionName",
|
|
75
76
|
)
|
|
76
77
|
|
|
78
|
+
|
|
77
79
|
ApproximateCreationDateTimePrecisionType = Literal["MICROSECOND", "MILLISECOND"]
|
|
78
80
|
AttributeActionType = Literal["ADD", "DELETE", "PUT"]
|
|
79
81
|
BackupStatusType = Literal["AVAILABLE", "CREATING", "DELETED"]
|
|
@@ -242,7 +244,6 @@ ServiceName = Literal[
|
|
|
242
244
|
"codeguru-security",
|
|
243
245
|
"codeguruprofiler",
|
|
244
246
|
"codepipeline",
|
|
245
|
-
"codestar",
|
|
246
247
|
"codestar-connections",
|
|
247
248
|
"codestar-notifications",
|
|
248
249
|
"cognito-identity",
|
|
@@ -435,6 +436,7 @@ ServiceName = Literal[
|
|
|
435
436
|
"payment-cryptography-data",
|
|
436
437
|
"pca-connector-ad",
|
|
437
438
|
"pca-connector-scep",
|
|
439
|
+
"pcs",
|
|
438
440
|
"personalize",
|
|
439
441
|
"personalize-events",
|
|
440
442
|
"personalize-runtime",
|
|
@@ -513,6 +515,7 @@ ServiceName = Literal[
|
|
|
513
515
|
"ssm",
|
|
514
516
|
"ssm-contacts",
|
|
515
517
|
"ssm-incidents",
|
|
518
|
+
"ssm-quicksetup",
|
|
516
519
|
"ssm-sap",
|
|
517
520
|
"sso",
|
|
518
521
|
"sso-admin",
|
|
@@ -578,6 +581,7 @@ RegionName = Literal[
|
|
|
578
581
|
"ap-southeast-2",
|
|
579
582
|
"ap-southeast-3",
|
|
580
583
|
"ap-southeast-4",
|
|
584
|
+
"ap-southeast-5",
|
|
581
585
|
"ca-central-1",
|
|
582
586
|
"ca-west-1",
|
|
583
587
|
"eu-central-1",
|
mypy_boto3_dynamodb/literals.pyi
CHANGED
|
@@ -242,7 +242,6 @@ ServiceName = Literal[
|
|
|
242
242
|
"codeguru-security",
|
|
243
243
|
"codeguruprofiler",
|
|
244
244
|
"codepipeline",
|
|
245
|
-
"codestar",
|
|
246
245
|
"codestar-connections",
|
|
247
246
|
"codestar-notifications",
|
|
248
247
|
"cognito-identity",
|
|
@@ -435,6 +434,7 @@ ServiceName = Literal[
|
|
|
435
434
|
"payment-cryptography-data",
|
|
436
435
|
"pca-connector-ad",
|
|
437
436
|
"pca-connector-scep",
|
|
437
|
+
"pcs",
|
|
438
438
|
"personalize",
|
|
439
439
|
"personalize-events",
|
|
440
440
|
"personalize-runtime",
|
|
@@ -513,6 +513,7 @@ ServiceName = Literal[
|
|
|
513
513
|
"ssm",
|
|
514
514
|
"ssm-contacts",
|
|
515
515
|
"ssm-incidents",
|
|
516
|
+
"ssm-quicksetup",
|
|
516
517
|
"ssm-sap",
|
|
517
518
|
"sso",
|
|
518
519
|
"sso-admin",
|
|
@@ -578,6 +579,7 @@ RegionName = Literal[
|
|
|
578
579
|
"ap-southeast-2",
|
|
579
580
|
"ap-southeast-3",
|
|
580
581
|
"ap-southeast-4",
|
|
582
|
+
"ap-southeast-5",
|
|
581
583
|
"ca-central-1",
|
|
582
584
|
"ca-west-1",
|
|
583
585
|
"eu-central-1",
|
mypy_boto3_dynamodb/paginator.py
CHANGED
|
@@ -28,28 +28,30 @@ Usage::
|
|
|
28
28
|
```
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
import sys
|
|
32
|
+
from typing import Generic, Iterator, TypeVar
|
|
32
33
|
|
|
33
34
|
from botocore.paginate import PageIterator, Paginator
|
|
34
35
|
|
|
35
|
-
from .literals import (
|
|
36
|
-
BackupTypeFilterType,
|
|
37
|
-
ConditionalOperatorType,
|
|
38
|
-
ReturnConsumedCapacityType,
|
|
39
|
-
SelectType,
|
|
40
|
-
)
|
|
41
36
|
from .type_defs import (
|
|
42
|
-
|
|
37
|
+
ListBackupsInputListBackupsPaginateTypeDef,
|
|
43
38
|
ListBackupsOutputTypeDef,
|
|
39
|
+
ListTablesInputListTablesPaginateTypeDef,
|
|
44
40
|
ListTablesOutputTypeDef,
|
|
41
|
+
ListTagsOfResourceInputListTagsOfResourcePaginateTypeDef,
|
|
45
42
|
ListTagsOfResourceOutputTypeDef,
|
|
46
|
-
|
|
43
|
+
QueryInputQueryPaginateTypeDef,
|
|
47
44
|
QueryOutputTypeDef,
|
|
45
|
+
ScanInputScanPaginateTypeDef,
|
|
48
46
|
ScanOutputTypeDef,
|
|
49
|
-
TimestampTypeDef,
|
|
50
|
-
UniversalAttributeValueTypeDef,
|
|
51
47
|
)
|
|
52
48
|
|
|
49
|
+
if sys.version_info >= (3, 12):
|
|
50
|
+
from typing import Unpack
|
|
51
|
+
else:
|
|
52
|
+
from typing_extensions import Unpack
|
|
53
|
+
|
|
54
|
+
|
|
53
55
|
__all__ = (
|
|
54
56
|
"ListBackupsPaginator",
|
|
55
57
|
"ListTablesPaginator",
|
|
@@ -58,6 +60,7 @@ __all__ = (
|
|
|
58
60
|
"ScanPaginator",
|
|
59
61
|
)
|
|
60
62
|
|
|
63
|
+
|
|
61
64
|
_ItemTypeDef = TypeVar("_ItemTypeDef")
|
|
62
65
|
|
|
63
66
|
|
|
@@ -75,13 +78,7 @@ class ListBackupsPaginator(Paginator):
|
|
|
75
78
|
"""
|
|
76
79
|
|
|
77
80
|
def paginate(
|
|
78
|
-
self,
|
|
79
|
-
*,
|
|
80
|
-
TableName: str = ...,
|
|
81
|
-
TimeRangeLowerBound: TimestampTypeDef = ...,
|
|
82
|
-
TimeRangeUpperBound: TimestampTypeDef = ...,
|
|
83
|
-
BackupType: BackupTypeFilterType = ...,
|
|
84
|
-
PaginationConfig: PaginatorConfigTypeDef = ...,
|
|
81
|
+
self, **kwargs: Unpack[ListBackupsInputListBackupsPaginateTypeDef]
|
|
85
82
|
) -> _PageIterator[ListBackupsOutputTypeDef]:
|
|
86
83
|
"""
|
|
87
84
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListBackups.paginate)
|
|
@@ -96,7 +93,7 @@ class ListTablesPaginator(Paginator):
|
|
|
96
93
|
"""
|
|
97
94
|
|
|
98
95
|
def paginate(
|
|
99
|
-
self,
|
|
96
|
+
self, **kwargs: Unpack[ListTablesInputListTablesPaginateTypeDef]
|
|
100
97
|
) -> _PageIterator[ListTablesOutputTypeDef]:
|
|
101
98
|
"""
|
|
102
99
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListTables.paginate)
|
|
@@ -111,7 +108,7 @@ class ListTagsOfResourcePaginator(Paginator):
|
|
|
111
108
|
"""
|
|
112
109
|
|
|
113
110
|
def paginate(
|
|
114
|
-
self,
|
|
111
|
+
self, **kwargs: Unpack[ListTagsOfResourceInputListTagsOfResourcePaginateTypeDef]
|
|
115
112
|
) -> _PageIterator[ListTagsOfResourceOutputTypeDef]:
|
|
116
113
|
"""
|
|
117
114
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListTagsOfResource.paginate)
|
|
@@ -126,24 +123,7 @@ class QueryPaginator(Paginator):
|
|
|
126
123
|
"""
|
|
127
124
|
|
|
128
125
|
def paginate(
|
|
129
|
-
self,
|
|
130
|
-
*,
|
|
131
|
-
TableName: str,
|
|
132
|
-
IndexName: str = ...,
|
|
133
|
-
Select: SelectType = ...,
|
|
134
|
-
AttributesToGet: Sequence[str] = ...,
|
|
135
|
-
ConsistentRead: bool = ...,
|
|
136
|
-
KeyConditions: Mapping[str, ConditionTypeDef] = ...,
|
|
137
|
-
QueryFilter: Mapping[str, ConditionTypeDef] = ...,
|
|
138
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
139
|
-
ScanIndexForward: bool = ...,
|
|
140
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
141
|
-
ProjectionExpression: str = ...,
|
|
142
|
-
FilterExpression: str = ...,
|
|
143
|
-
KeyConditionExpression: str = ...,
|
|
144
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
145
|
-
ExpressionAttributeValues: Mapping[str, UniversalAttributeValueTypeDef] = ...,
|
|
146
|
-
PaginationConfig: PaginatorConfigTypeDef = ...,
|
|
126
|
+
self, **kwargs: Unpack[QueryInputQueryPaginateTypeDef]
|
|
147
127
|
) -> _PageIterator[QueryOutputTypeDef]:
|
|
148
128
|
"""
|
|
149
129
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.Query.paginate)
|
|
@@ -158,23 +138,7 @@ class ScanPaginator(Paginator):
|
|
|
158
138
|
"""
|
|
159
139
|
|
|
160
140
|
def paginate(
|
|
161
|
-
self,
|
|
162
|
-
*,
|
|
163
|
-
TableName: str,
|
|
164
|
-
IndexName: str = ...,
|
|
165
|
-
AttributesToGet: Sequence[str] = ...,
|
|
166
|
-
Select: SelectType = ...,
|
|
167
|
-
ScanFilter: Mapping[str, ConditionTypeDef] = ...,
|
|
168
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
169
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
170
|
-
TotalSegments: int = ...,
|
|
171
|
-
Segment: int = ...,
|
|
172
|
-
ProjectionExpression: str = ...,
|
|
173
|
-
FilterExpression: str = ...,
|
|
174
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
175
|
-
ExpressionAttributeValues: Mapping[str, UniversalAttributeValueTypeDef] = ...,
|
|
176
|
-
ConsistentRead: bool = ...,
|
|
177
|
-
PaginationConfig: PaginatorConfigTypeDef = ...,
|
|
141
|
+
self, **kwargs: Unpack[ScanInputScanPaginateTypeDef]
|
|
178
142
|
) -> _PageIterator[ScanOutputTypeDef]:
|
|
179
143
|
"""
|
|
180
144
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.Scan.paginate)
|
|
@@ -28,28 +28,29 @@ Usage::
|
|
|
28
28
|
```
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
import sys
|
|
32
|
+
from typing import Generic, Iterator, TypeVar
|
|
32
33
|
|
|
33
34
|
from botocore.paginate import PageIterator, Paginator
|
|
34
35
|
|
|
35
|
-
from .literals import (
|
|
36
|
-
BackupTypeFilterType,
|
|
37
|
-
ConditionalOperatorType,
|
|
38
|
-
ReturnConsumedCapacityType,
|
|
39
|
-
SelectType,
|
|
40
|
-
)
|
|
41
36
|
from .type_defs import (
|
|
42
|
-
|
|
37
|
+
ListBackupsInputListBackupsPaginateTypeDef,
|
|
43
38
|
ListBackupsOutputTypeDef,
|
|
39
|
+
ListTablesInputListTablesPaginateTypeDef,
|
|
44
40
|
ListTablesOutputTypeDef,
|
|
41
|
+
ListTagsOfResourceInputListTagsOfResourcePaginateTypeDef,
|
|
45
42
|
ListTagsOfResourceOutputTypeDef,
|
|
46
|
-
|
|
43
|
+
QueryInputQueryPaginateTypeDef,
|
|
47
44
|
QueryOutputTypeDef,
|
|
45
|
+
ScanInputScanPaginateTypeDef,
|
|
48
46
|
ScanOutputTypeDef,
|
|
49
|
-
TimestampTypeDef,
|
|
50
|
-
UniversalAttributeValueTypeDef,
|
|
51
47
|
)
|
|
52
48
|
|
|
49
|
+
if sys.version_info >= (3, 12):
|
|
50
|
+
from typing import Unpack
|
|
51
|
+
else:
|
|
52
|
+
from typing_extensions import Unpack
|
|
53
|
+
|
|
53
54
|
__all__ = (
|
|
54
55
|
"ListBackupsPaginator",
|
|
55
56
|
"ListTablesPaginator",
|
|
@@ -71,15 +72,8 @@ class ListBackupsPaginator(Paginator):
|
|
|
71
72
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListBackups)
|
|
72
73
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/paginators/#listbackupspaginator)
|
|
73
74
|
"""
|
|
74
|
-
|
|
75
75
|
def paginate(
|
|
76
|
-
self,
|
|
77
|
-
*,
|
|
78
|
-
TableName: str = ...,
|
|
79
|
-
TimeRangeLowerBound: TimestampTypeDef = ...,
|
|
80
|
-
TimeRangeUpperBound: TimestampTypeDef = ...,
|
|
81
|
-
BackupType: BackupTypeFilterType = ...,
|
|
82
|
-
PaginationConfig: PaginatorConfigTypeDef = ...,
|
|
76
|
+
self, **kwargs: Unpack[ListBackupsInputListBackupsPaginateTypeDef]
|
|
83
77
|
) -> _PageIterator[ListBackupsOutputTypeDef]:
|
|
84
78
|
"""
|
|
85
79
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListBackups.paginate)
|
|
@@ -91,9 +85,8 @@ class ListTablesPaginator(Paginator):
|
|
|
91
85
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListTables)
|
|
92
86
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/paginators/#listtablespaginator)
|
|
93
87
|
"""
|
|
94
|
-
|
|
95
88
|
def paginate(
|
|
96
|
-
self,
|
|
89
|
+
self, **kwargs: Unpack[ListTablesInputListTablesPaginateTypeDef]
|
|
97
90
|
) -> _PageIterator[ListTablesOutputTypeDef]:
|
|
98
91
|
"""
|
|
99
92
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListTables.paginate)
|
|
@@ -105,9 +98,8 @@ class ListTagsOfResourcePaginator(Paginator):
|
|
|
105
98
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListTagsOfResource)
|
|
106
99
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/paginators/#listtagsofresourcepaginator)
|
|
107
100
|
"""
|
|
108
|
-
|
|
109
101
|
def paginate(
|
|
110
|
-
self,
|
|
102
|
+
self, **kwargs: Unpack[ListTagsOfResourceInputListTagsOfResourcePaginateTypeDef]
|
|
111
103
|
) -> _PageIterator[ListTagsOfResourceOutputTypeDef]:
|
|
112
104
|
"""
|
|
113
105
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.ListTagsOfResource.paginate)
|
|
@@ -119,26 +111,8 @@ class QueryPaginator(Paginator):
|
|
|
119
111
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.Query)
|
|
120
112
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/paginators/#querypaginator)
|
|
121
113
|
"""
|
|
122
|
-
|
|
123
114
|
def paginate(
|
|
124
|
-
self,
|
|
125
|
-
*,
|
|
126
|
-
TableName: str,
|
|
127
|
-
IndexName: str = ...,
|
|
128
|
-
Select: SelectType = ...,
|
|
129
|
-
AttributesToGet: Sequence[str] = ...,
|
|
130
|
-
ConsistentRead: bool = ...,
|
|
131
|
-
KeyConditions: Mapping[str, ConditionTypeDef] = ...,
|
|
132
|
-
QueryFilter: Mapping[str, ConditionTypeDef] = ...,
|
|
133
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
134
|
-
ScanIndexForward: bool = ...,
|
|
135
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
136
|
-
ProjectionExpression: str = ...,
|
|
137
|
-
FilterExpression: str = ...,
|
|
138
|
-
KeyConditionExpression: str = ...,
|
|
139
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
140
|
-
ExpressionAttributeValues: Mapping[str, UniversalAttributeValueTypeDef] = ...,
|
|
141
|
-
PaginationConfig: PaginatorConfigTypeDef = ...,
|
|
115
|
+
self, **kwargs: Unpack[QueryInputQueryPaginateTypeDef]
|
|
142
116
|
) -> _PageIterator[QueryOutputTypeDef]:
|
|
143
117
|
"""
|
|
144
118
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.Query.paginate)
|
|
@@ -150,25 +124,8 @@ class ScanPaginator(Paginator):
|
|
|
150
124
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.Scan)
|
|
151
125
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/paginators/#scanpaginator)
|
|
152
126
|
"""
|
|
153
|
-
|
|
154
127
|
def paginate(
|
|
155
|
-
self,
|
|
156
|
-
*,
|
|
157
|
-
TableName: str,
|
|
158
|
-
IndexName: str = ...,
|
|
159
|
-
AttributesToGet: Sequence[str] = ...,
|
|
160
|
-
Select: SelectType = ...,
|
|
161
|
-
ScanFilter: Mapping[str, ConditionTypeDef] = ...,
|
|
162
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
163
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
164
|
-
TotalSegments: int = ...,
|
|
165
|
-
Segment: int = ...,
|
|
166
|
-
ProjectionExpression: str = ...,
|
|
167
|
-
FilterExpression: str = ...,
|
|
168
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
169
|
-
ExpressionAttributeValues: Mapping[str, UniversalAttributeValueTypeDef] = ...,
|
|
170
|
-
ConsistentRead: bool = ...,
|
|
171
|
-
PaginationConfig: PaginatorConfigTypeDef = ...,
|
|
128
|
+
self, **kwargs: Unpack[ScanInputScanPaginateTypeDef]
|
|
172
129
|
) -> _PageIterator[ScanOutputTypeDef]:
|
|
173
130
|
"""
|
|
174
131
|
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Paginator.Scan.paginate)
|
|
@@ -18,64 +18,57 @@ Usage::
|
|
|
18
18
|
```
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
+
import sys
|
|
21
22
|
from datetime import datetime
|
|
22
|
-
from typing import Iterator, List,
|
|
23
|
+
from typing import Iterator, List, Sequence
|
|
23
24
|
|
|
24
25
|
from boto3.dynamodb.table import BatchWriter
|
|
25
26
|
from boto3.resources.base import ResourceMeta, ServiceResource
|
|
26
27
|
from boto3.resources.collection import ResourceCollection
|
|
27
28
|
|
|
28
29
|
from .client import DynamoDBClient
|
|
29
|
-
from .literals import
|
|
30
|
-
BillingModeType,
|
|
31
|
-
ConditionalOperatorType,
|
|
32
|
-
ReturnConsumedCapacityType,
|
|
33
|
-
ReturnItemCollectionMetricsType,
|
|
34
|
-
ReturnValuesOnConditionCheckFailureType,
|
|
35
|
-
ReturnValueType,
|
|
36
|
-
SelectType,
|
|
37
|
-
TableClassType,
|
|
38
|
-
TableStatusType,
|
|
39
|
-
)
|
|
30
|
+
from .literals import TableStatusType
|
|
40
31
|
from .type_defs import (
|
|
41
32
|
ArchivalSummaryTypeDef,
|
|
42
33
|
AttributeDefinitionTypeDef,
|
|
43
|
-
|
|
34
|
+
BatchGetItemInputServiceResourceBatchGetItemTypeDef,
|
|
44
35
|
BatchGetItemOutputServiceResourceTypeDef,
|
|
36
|
+
BatchWriteItemInputServiceResourceBatchWriteItemTypeDef,
|
|
45
37
|
BatchWriteItemOutputServiceResourceTypeDef,
|
|
46
38
|
BillingModeSummaryTypeDef,
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
CreateTableInputServiceResourceCreateTableTypeDef,
|
|
40
|
+
DeleteItemInputTableDeleteItemTypeDef,
|
|
49
41
|
DeleteItemOutputTableTypeDef,
|
|
50
42
|
DeleteTableOutputTypeDef,
|
|
51
|
-
|
|
43
|
+
GetItemInputTableGetItemTypeDef,
|
|
52
44
|
GetItemOutputTableTypeDef,
|
|
53
45
|
GlobalSecondaryIndexDescriptionTypeDef,
|
|
54
|
-
GlobalSecondaryIndexUnionTypeDef,
|
|
55
|
-
GlobalSecondaryIndexUpdateTypeDef,
|
|
56
|
-
KeysAndAttributesServiceResourceUnionTypeDef,
|
|
57
46
|
KeySchemaElementTypeDef,
|
|
58
47
|
LocalSecondaryIndexDescriptionTypeDef,
|
|
59
|
-
LocalSecondaryIndexTypeDef,
|
|
60
48
|
OnDemandThroughputTypeDef,
|
|
61
49
|
ProvisionedThroughputDescriptionTypeDef,
|
|
62
|
-
|
|
50
|
+
PutItemInputTablePutItemTypeDef,
|
|
63
51
|
PutItemOutputTableTypeDef,
|
|
52
|
+
QueryInputTableQueryTypeDef,
|
|
64
53
|
QueryOutputTableTypeDef,
|
|
65
54
|
ReplicaDescriptionTypeDef,
|
|
66
|
-
ReplicationGroupUpdateTypeDef,
|
|
67
55
|
RestoreSummaryTypeDef,
|
|
56
|
+
ScanInputTableScanTypeDef,
|
|
68
57
|
ScanOutputTableTypeDef,
|
|
69
58
|
SSEDescriptionTypeDef,
|
|
70
|
-
SSESpecificationTypeDef,
|
|
71
59
|
StreamSpecificationTypeDef,
|
|
72
|
-
TableAttributeValueTypeDef,
|
|
73
60
|
TableClassSummaryTypeDef,
|
|
74
|
-
|
|
61
|
+
UpdateItemInputTableUpdateItemTypeDef,
|
|
75
62
|
UpdateItemOutputTableTypeDef,
|
|
76
|
-
|
|
63
|
+
UpdateTableInputTableUpdateTypeDef,
|
|
77
64
|
)
|
|
78
65
|
|
|
66
|
+
if sys.version_info >= (3, 12):
|
|
67
|
+
from typing import Unpack
|
|
68
|
+
else:
|
|
69
|
+
from typing_extensions import Unpack
|
|
70
|
+
|
|
71
|
+
|
|
79
72
|
__all__ = ("DynamoDBServiceResource", "Table", "ServiceResourceTablesCollection")
|
|
80
73
|
|
|
81
74
|
|
|
@@ -167,7 +160,7 @@ class Table(ServiceResource):
|
|
|
167
160
|
deletion_protection_enabled: bool
|
|
168
161
|
on_demand_throughput: OnDemandThroughputTypeDef
|
|
169
162
|
name: str
|
|
170
|
-
meta: "DynamoDBResourceMeta"
|
|
163
|
+
meta: "DynamoDBResourceMeta" # type: ignore
|
|
171
164
|
|
|
172
165
|
def batch_writer(self, overwrite_by_pkeys: List[str] = ...) -> BatchWriter:
|
|
173
166
|
"""
|
|
@@ -186,18 +179,7 @@ class Table(ServiceResource):
|
|
|
186
179
|
"""
|
|
187
180
|
|
|
188
181
|
def delete_item(
|
|
189
|
-
self,
|
|
190
|
-
*,
|
|
191
|
-
Key: Mapping[str, TableAttributeValueTypeDef],
|
|
192
|
-
Expected: Mapping[str, ExpectedAttributeValueTableTypeDef] = ...,
|
|
193
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
194
|
-
ReturnValues: ReturnValueType = ...,
|
|
195
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
196
|
-
ReturnItemCollectionMetrics: ReturnItemCollectionMetricsType = ...,
|
|
197
|
-
ConditionExpression: ConditionBaseImportTypeDef = ...,
|
|
198
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
199
|
-
ExpressionAttributeValues: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
200
|
-
ReturnValuesOnConditionCheckFailure: ReturnValuesOnConditionCheckFailureType = ...,
|
|
182
|
+
self, **kwargs: Unpack[DeleteItemInputTableDeleteItemTypeDef]
|
|
201
183
|
) -> DeleteItemOutputTableTypeDef:
|
|
202
184
|
"""
|
|
203
185
|
Deletes a single item in a table by primary key.
|
|
@@ -215,14 +197,7 @@ class Table(ServiceResource):
|
|
|
215
197
|
"""
|
|
216
198
|
|
|
217
199
|
def get_item(
|
|
218
|
-
self,
|
|
219
|
-
*,
|
|
220
|
-
Key: Mapping[str, TableAttributeValueTypeDef],
|
|
221
|
-
AttributesToGet: Sequence[str] = ...,
|
|
222
|
-
ConsistentRead: bool = ...,
|
|
223
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
224
|
-
ProjectionExpression: str = ...,
|
|
225
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
200
|
+
self, **kwargs: Unpack[GetItemInputTableGetItemTypeDef]
|
|
226
201
|
) -> GetItemOutputTableTypeDef:
|
|
227
202
|
"""
|
|
228
203
|
The `GetItem` operation returns a set of attributes for the item with the given
|
|
@@ -244,18 +219,7 @@ class Table(ServiceResource):
|
|
|
244
219
|
"""
|
|
245
220
|
|
|
246
221
|
def put_item(
|
|
247
|
-
self,
|
|
248
|
-
*,
|
|
249
|
-
Item: Mapping[str, TableAttributeValueTypeDef],
|
|
250
|
-
Expected: Mapping[str, ExpectedAttributeValueTableTypeDef] = ...,
|
|
251
|
-
ReturnValues: ReturnValueType = ...,
|
|
252
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
253
|
-
ReturnItemCollectionMetrics: ReturnItemCollectionMetricsType = ...,
|
|
254
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
255
|
-
ConditionExpression: ConditionBaseImportTypeDef = ...,
|
|
256
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
257
|
-
ExpressionAttributeValues: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
258
|
-
ReturnValuesOnConditionCheckFailure: ReturnValuesOnConditionCheckFailureType = ...,
|
|
222
|
+
self, **kwargs: Unpack[PutItemInputTablePutItemTypeDef]
|
|
259
223
|
) -> PutItemOutputTableTypeDef:
|
|
260
224
|
"""
|
|
261
225
|
Creates a new item, or replaces an old item with a new item.
|
|
@@ -264,26 +228,7 @@ class Table(ServiceResource):
|
|
|
264
228
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/service_resource/#tableput_item-method)
|
|
265
229
|
"""
|
|
266
230
|
|
|
267
|
-
def query(
|
|
268
|
-
self,
|
|
269
|
-
*,
|
|
270
|
-
IndexName: str = ...,
|
|
271
|
-
Select: SelectType = ...,
|
|
272
|
-
AttributesToGet: Sequence[str] = ...,
|
|
273
|
-
Limit: int = ...,
|
|
274
|
-
ConsistentRead: bool = ...,
|
|
275
|
-
KeyConditions: Mapping[str, ConditionTableTypeDef] = ...,
|
|
276
|
-
QueryFilter: Mapping[str, ConditionTableTypeDef] = ...,
|
|
277
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
278
|
-
ScanIndexForward: bool = ...,
|
|
279
|
-
ExclusiveStartKey: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
280
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
281
|
-
ProjectionExpression: str = ...,
|
|
282
|
-
FilterExpression: ConditionBaseImportTypeDef = ...,
|
|
283
|
-
KeyConditionExpression: ConditionBaseImportTypeDef = ...,
|
|
284
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
285
|
-
ExpressionAttributeValues: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
286
|
-
) -> QueryOutputTableTypeDef:
|
|
231
|
+
def query(self, **kwargs: Unpack[QueryInputTableQueryTypeDef]) -> QueryOutputTableTypeDef:
|
|
287
232
|
"""
|
|
288
233
|
You must provide the name of the partition key attribute and a single value for
|
|
289
234
|
that
|
|
@@ -303,25 +248,7 @@ class Table(ServiceResource):
|
|
|
303
248
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/service_resource/#tablereload-method)
|
|
304
249
|
"""
|
|
305
250
|
|
|
306
|
-
def scan(
|
|
307
|
-
self,
|
|
308
|
-
*,
|
|
309
|
-
IndexName: str = ...,
|
|
310
|
-
AttributesToGet: Sequence[str] = ...,
|
|
311
|
-
Limit: int = ...,
|
|
312
|
-
Select: SelectType = ...,
|
|
313
|
-
ScanFilter: Mapping[str, ConditionTableTypeDef] = ...,
|
|
314
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
315
|
-
ExclusiveStartKey: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
316
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
317
|
-
TotalSegments: int = ...,
|
|
318
|
-
Segment: int = ...,
|
|
319
|
-
ProjectionExpression: str = ...,
|
|
320
|
-
FilterExpression: ConditionBaseImportTypeDef = ...,
|
|
321
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
322
|
-
ExpressionAttributeValues: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
323
|
-
ConsistentRead: bool = ...,
|
|
324
|
-
) -> ScanOutputTableTypeDef:
|
|
251
|
+
def scan(self, **kwargs: Unpack[ScanInputTableScanTypeDef]) -> ScanOutputTableTypeDef:
|
|
325
252
|
"""
|
|
326
253
|
The `Scan` operation returns one or more items and item attributes by accessing
|
|
327
254
|
every item in a table or a secondary
|
|
@@ -331,20 +258,7 @@ class Table(ServiceResource):
|
|
|
331
258
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/service_resource/#tablescan-method)
|
|
332
259
|
"""
|
|
333
260
|
|
|
334
|
-
def update(
|
|
335
|
-
self,
|
|
336
|
-
*,
|
|
337
|
-
AttributeDefinitions: Sequence[AttributeDefinitionTypeDef] = ...,
|
|
338
|
-
BillingMode: BillingModeType = ...,
|
|
339
|
-
ProvisionedThroughput: ProvisionedThroughputTypeDef = ...,
|
|
340
|
-
GlobalSecondaryIndexUpdates: Sequence[GlobalSecondaryIndexUpdateTypeDef] = ...,
|
|
341
|
-
StreamSpecification: StreamSpecificationTypeDef = ...,
|
|
342
|
-
SSESpecification: SSESpecificationTypeDef = ...,
|
|
343
|
-
ReplicaUpdates: Sequence[ReplicationGroupUpdateTypeDef] = ...,
|
|
344
|
-
TableClass: TableClassType = ...,
|
|
345
|
-
DeletionProtectionEnabled: bool = ...,
|
|
346
|
-
OnDemandThroughput: OnDemandThroughputTypeDef = ...,
|
|
347
|
-
) -> "_Table":
|
|
261
|
+
def update(self, **kwargs: Unpack[UpdateTableInputTableUpdateTypeDef]) -> "_Table":
|
|
348
262
|
"""
|
|
349
263
|
Modifies the provisioned throughput settings, global secondary indexes, or
|
|
350
264
|
DynamoDB Streams settings for a given
|
|
@@ -355,20 +269,7 @@ class Table(ServiceResource):
|
|
|
355
269
|
"""
|
|
356
270
|
|
|
357
271
|
def update_item(
|
|
358
|
-
self,
|
|
359
|
-
*,
|
|
360
|
-
Key: Mapping[str, TableAttributeValueTypeDef],
|
|
361
|
-
AttributeUpdates: Mapping[str, AttributeValueUpdateTableTypeDef] = ...,
|
|
362
|
-
Expected: Mapping[str, ExpectedAttributeValueTableTypeDef] = ...,
|
|
363
|
-
ConditionalOperator: ConditionalOperatorType = ...,
|
|
364
|
-
ReturnValues: ReturnValueType = ...,
|
|
365
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
366
|
-
ReturnItemCollectionMetrics: ReturnItemCollectionMetricsType = ...,
|
|
367
|
-
UpdateExpression: str = ...,
|
|
368
|
-
ConditionExpression: ConditionBaseImportTypeDef = ...,
|
|
369
|
-
ExpressionAttributeNames: Mapping[str, str] = ...,
|
|
370
|
-
ExpressionAttributeValues: Mapping[str, TableAttributeValueTypeDef] = ...,
|
|
371
|
-
ReturnValuesOnConditionCheckFailure: ReturnValuesOnConditionCheckFailureType = ...,
|
|
272
|
+
self, **kwargs: Unpack[UpdateItemInputTableUpdateItemTypeDef]
|
|
372
273
|
) -> UpdateItemOutputTableTypeDef:
|
|
373
274
|
"""
|
|
374
275
|
Edits an existing item's attributes, or adds a new item to the table if it does
|
|
@@ -409,7 +310,7 @@ class DynamoDBServiceResource(ServiceResource):
|
|
|
409
310
|
[Show boto3-stubs documentation](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/service_resource/)
|
|
410
311
|
"""
|
|
411
312
|
|
|
412
|
-
meta: "DynamoDBResourceMeta"
|
|
313
|
+
meta: "DynamoDBResourceMeta" # type: ignore
|
|
413
314
|
tables: ServiceResourceTablesCollection
|
|
414
315
|
|
|
415
316
|
def Table(self, name: str) -> "_Table":
|
|
@@ -421,10 +322,7 @@ class DynamoDBServiceResource(ServiceResource):
|
|
|
421
322
|
"""
|
|
422
323
|
|
|
423
324
|
def batch_get_item(
|
|
424
|
-
self,
|
|
425
|
-
*,
|
|
426
|
-
RequestItems: Mapping[str, KeysAndAttributesServiceResourceUnionTypeDef],
|
|
427
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
325
|
+
self, **kwargs: Unpack[BatchGetItemInputServiceResourceBatchGetItemTypeDef]
|
|
428
326
|
) -> BatchGetItemOutputServiceResourceTypeDef:
|
|
429
327
|
"""
|
|
430
328
|
The `BatchGetItem` operation returns the attributes of one or more items from
|
|
@@ -436,11 +334,7 @@ class DynamoDBServiceResource(ServiceResource):
|
|
|
436
334
|
"""
|
|
437
335
|
|
|
438
336
|
def batch_write_item(
|
|
439
|
-
self,
|
|
440
|
-
*,
|
|
441
|
-
RequestItems: Mapping[str, Sequence[WriteRequestServiceResourceUnionTypeDef]],
|
|
442
|
-
ReturnConsumedCapacity: ReturnConsumedCapacityType = ...,
|
|
443
|
-
ReturnItemCollectionMetrics: ReturnItemCollectionMetricsType = ...,
|
|
337
|
+
self, **kwargs: Unpack[BatchWriteItemInputServiceResourceBatchWriteItemTypeDef]
|
|
444
338
|
) -> BatchWriteItemOutputServiceResourceTypeDef:
|
|
445
339
|
"""
|
|
446
340
|
The `BatchWriteItem` operation puts or deletes multiple items in one or more
|
|
@@ -451,22 +345,7 @@ class DynamoDBServiceResource(ServiceResource):
|
|
|
451
345
|
"""
|
|
452
346
|
|
|
453
347
|
def create_table(
|
|
454
|
-
self,
|
|
455
|
-
*,
|
|
456
|
-
AttributeDefinitions: Sequence[AttributeDefinitionTypeDef],
|
|
457
|
-
TableName: str,
|
|
458
|
-
KeySchema: Sequence[KeySchemaElementTypeDef],
|
|
459
|
-
LocalSecondaryIndexes: Sequence[LocalSecondaryIndexTypeDef] = ...,
|
|
460
|
-
GlobalSecondaryIndexes: Sequence[GlobalSecondaryIndexUnionTypeDef] = ...,
|
|
461
|
-
BillingMode: BillingModeType = ...,
|
|
462
|
-
ProvisionedThroughput: ProvisionedThroughputTypeDef = ...,
|
|
463
|
-
StreamSpecification: StreamSpecificationTypeDef = ...,
|
|
464
|
-
SSESpecification: SSESpecificationTypeDef = ...,
|
|
465
|
-
Tags: Sequence[TagTypeDef] = ...,
|
|
466
|
-
TableClass: TableClassType = ...,
|
|
467
|
-
DeletionProtectionEnabled: bool = ...,
|
|
468
|
-
ResourcePolicy: str = ...,
|
|
469
|
-
OnDemandThroughput: OnDemandThroughputTypeDef = ...,
|
|
348
|
+
self, **kwargs: Unpack[CreateTableInputServiceResourceCreateTableTypeDef]
|
|
470
349
|
) -> "_Table":
|
|
471
350
|
"""
|
|
472
351
|
The `CreateTable` operation adds a new table to your account.
|