awslabs.dynamodb-mcp-server 1.0.8__py3-none-any.whl → 2.0.1__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.

Potentially problematic release.


This version of awslabs.dynamodb-mcp-server might be problematic. Click here for more details.

@@ -14,4 +14,4 @@
14
14
 
15
15
  """awslabs.dynamodb-mcp-server"""
16
16
 
17
- __version__ = '1.0.8'
17
+ __version__ = '2.0.1'
@@ -14,8 +14,7 @@
14
14
 
15
15
  import os
16
16
  from functools import wraps
17
- from typing import Any, Callable, Dict, List, Literal, Optional
18
- from typing_extensions import TypedDict
17
+ from typing import Callable
19
18
 
20
19
 
21
20
  def handle_exceptions(func: Callable) -> Callable:
@@ -52,283 +51,3 @@ def mutation_check(func):
52
51
  return await func(*args, **kwargs)
53
52
 
54
53
  return wrapper
55
-
56
-
57
- # Type definitions
58
- AttributeValue = Dict[Literal['S', 'N', 'B', 'BOOL', 'NULL', 'L', 'M', 'SS', 'NS', 'BS'], Any]
59
- KeyAttributeValue = Dict[Literal['S', 'N', 'B'], Any]
60
-
61
- # Return value enums
62
- ReturnValue = Literal['NONE', 'ALL_OLD', 'UPDATED_OLD', 'ALL_NEW', 'UPDATED_NEW']
63
- ReturnConsumedCapacity = Literal['INDEXES', 'TOTAL', 'NONE']
64
- ReturnItemCollectionMetrics = Literal['SIZE', 'NONE']
65
- Select = Literal['ALL_ATTRIBUTES', 'ALL_PROJECTED_ATTRIBUTES', 'SPECIFIC_ATTRIBUTES', 'COUNT']
66
-
67
-
68
- class ScanInput(TypedDict, total=False):
69
- """Parameters for Scan operation."""
70
-
71
- TableName: str # required
72
- IndexName: Optional[str]
73
- AttributesToGet: Optional[List[str]] # Legacy parameter
74
- Limit: Optional[int]
75
- Select: Optional[Select]
76
- ScanFilter: Optional[
77
- Dict[str, AttributeValue]
78
- ] # Legacy parameter (must use AttributeValue format e.g. {'S': 'value'})
79
- ConditionalOperator: Optional[Literal['AND', 'OR']] # Legacy parameter
80
- ExclusiveStartKey: Optional[
81
- Dict[str, KeyAttributeValue]
82
- ] # Primary key attributes in AttributeValue format e.g. {'S': 'value'}
83
- ReturnConsumedCapacity: Optional[ReturnConsumedCapacity]
84
- TotalSegments: Optional[int]
85
- Segment: Optional[int]
86
- ProjectionExpression: Optional[str]
87
- FilterExpression: Optional[str]
88
- ExpressionAttributeNames: Optional[Dict[str, str]]
89
- ExpressionAttributeValues: Optional[
90
- Dict[str, AttributeValue]
91
- ] # values must use AttributeValue format e.g. {'S': 'value'}
92
- ConsistentRead: Optional[bool]
93
-
94
-
95
- class QueryInput(TypedDict, total=False):
96
- """Parameters for Query operation."""
97
-
98
- TableName: str # required
99
- IndexName: Optional[str]
100
- Select: Optional[Select]
101
- AttributesToGet: Optional[List[str]] # Legacy parameter
102
- Limit: Optional[int]
103
- ConsistentRead: Optional[bool]
104
- KeyConditionExpression: Optional[str]
105
- FilterExpression: Optional[str]
106
- ProjectionExpression: Optional[str]
107
- ExpressionAttributeNames: Optional[Dict[str, str]]
108
- ExpressionAttributeValues: Optional[
109
- Dict[str, AttributeValue]
110
- ] # values must use AttributeValue format e.g. {'S': 'value'}
111
- ScanIndexForward: Optional[bool]
112
- ExclusiveStartKey: Optional[
113
- Dict[str, KeyAttributeValue]
114
- ] # Primary key attributes in AttributeValue format e.g. {'S': 'value'}
115
- ReturnConsumedCapacity: Optional[ReturnConsumedCapacity]
116
-
117
-
118
- class DeleteItemInput(TypedDict, total=False):
119
- """Parameters for DeleteItem operation."""
120
-
121
- TableName: str # required
122
- Key: Dict[
123
- str, KeyAttributeValue
124
- ] # required - primary key attributes in AttributeValue format e.g. {'S': 'value'}
125
- ConditionExpression: Optional[str]
126
- ExpressionAttributeNames: Optional[Dict[str, str]]
127
- ExpressionAttributeValues: Optional[
128
- Dict[str, AttributeValue]
129
- ] # values must use AttributeValue format e.g. {'S': 'value'}
130
- ReturnConsumedCapacity: Optional[ReturnConsumedCapacity]
131
- ReturnItemCollectionMetrics: Optional[ReturnItemCollectionMetrics]
132
- ReturnValues: Optional[ReturnValue]
133
- ReturnValuesOnConditionCheckFailure: Optional[Literal['ALL_OLD', 'NONE']]
134
-
135
-
136
- class UpdateItemInput(TypedDict, total=False):
137
- """Parameters for UpdateItem operation."""
138
-
139
- TableName: str # required
140
- Key: Dict[
141
- str, KeyAttributeValue
142
- ] # required - primary key attributes in AttributeValue format e.g. {'S': 'value'}
143
- UpdateExpression: Optional[str]
144
- ConditionExpression: Optional[str]
145
- ExpressionAttributeNames: Optional[Dict[str, str]]
146
- ExpressionAttributeValues: Optional[
147
- Dict[str, AttributeValue]
148
- ] # values must use AttributeValue format e.g. {'S': 'value'}
149
- ReturnConsumedCapacity: Optional[ReturnConsumedCapacity]
150
- ReturnItemCollectionMetrics: Optional[ReturnItemCollectionMetrics]
151
- ReturnValues: Optional[ReturnValue]
152
- ReturnValuesOnConditionCheckFailure: Optional[Literal['ALL_OLD', 'NONE']]
153
-
154
-
155
- class GetItemInput(TypedDict, total=False):
156
- """Parameters for GetItem operation."""
157
-
158
- TableName: str # required
159
- Key: Dict[
160
- str, KeyAttributeValue
161
- ] # required - primary key attributes in AttributeValue format e.g. {'S': 'value'}
162
- AttributesToGet: Optional[List[str]]
163
- ConsistentRead: Optional[bool]
164
- ExpressionAttributeNames: Optional[Dict[str, str]]
165
- ProjectionExpression: Optional[str]
166
- ReturnConsumedCapacity: Optional[ReturnConsumedCapacity]
167
-
168
-
169
- class PutItemInput(TypedDict, total=False):
170
- """Parameters for PutItem operation."""
171
-
172
- TableName: str # required
173
- Item: Dict[
174
- str, AttributeValue
175
- ] # required - maps attribute name to AttributeValue (must use AttributeValue format e.g. {'S': 'value'})
176
- ConditionExpression: Optional[str]
177
- ExpressionAttributeNames: Optional[Dict[str, str]]
178
- ExpressionAttributeValues: Optional[
179
- Dict[str, AttributeValue]
180
- ] # values must use AttributeValue format e.g. {'S': 'value'}
181
- ReturnConsumedCapacity: Optional[ReturnConsumedCapacity]
182
- ReturnItemCollectionMetrics: Optional[ReturnItemCollectionMetrics]
183
- ReturnValues: Optional[ReturnValue]
184
- ReturnValuesOnConditionCheckFailure: Optional[Literal['ALL_OLD', 'NONE']]
185
-
186
-
187
- class AttributeDefinition(TypedDict):
188
- AttributeName: str
189
- AttributeType: Literal['S', 'N', 'B']
190
-
191
-
192
- class KeySchemaElement(TypedDict):
193
- AttributeName: str
194
- KeyType: Literal['HASH', 'RANGE']
195
-
196
-
197
- class ProvisionedThroughput(TypedDict):
198
- ReadCapacityUnits: int
199
- WriteCapacityUnits: int
200
-
201
-
202
- class Projection(TypedDict, total=False):
203
- ProjectionType: Literal['KEYS_ONLY', 'INCLUDE', 'ALL']
204
- NonKeyAttributes: List[str]
205
-
206
-
207
- class OnDemandThroughput(TypedDict, total=False):
208
- MaxReadRequestUnits: int
209
- MaxWriteRequestUnits: int
210
-
211
-
212
- class WarmThroughput(TypedDict, total=False):
213
- ReadUnitsPerSecond: int
214
- WriteUnitsPerSecond: int
215
-
216
-
217
- class GlobalSecondaryIndex(TypedDict, total=False):
218
- IndexName: str # required
219
- KeySchema: List[KeySchemaElement] # required
220
- Projection: Projection # required
221
- ProvisionedThroughput: ProvisionedThroughput
222
- OnDemandThroughput: OnDemandThroughput
223
-
224
-
225
- class GlobalSecondaryIndexUpdateAction(TypedDict, total=False):
226
- IndexName: str
227
- ProvisionedThroughput: ProvisionedThroughput
228
- OnDemandThroughput: OnDemandThroughput
229
- WarmThroughput: WarmThroughput
230
-
231
-
232
- class GlobalSecondaryIndexDeleteAction(TypedDict):
233
- IndexName: str
234
-
235
-
236
- class GlobalSecondaryIndexUpdate(TypedDict, total=False):
237
- Create: GlobalSecondaryIndex
238
- Delete: GlobalSecondaryIndexDeleteAction
239
- Update: GlobalSecondaryIndexUpdateAction
240
-
241
-
242
- class StreamSpecification(TypedDict, total=False):
243
- StreamEnabled: bool
244
- StreamViewType: Literal['KEYS_ONLY', 'NEW_IMAGE', 'OLD_IMAGE', 'NEW_AND_OLD_IMAGES']
245
-
246
-
247
- class Tag(TypedDict):
248
- Key: str
249
- Value: str
250
-
251
-
252
- class SSESpecification(TypedDict, total=False):
253
- """Set Enabled to true for AWS managed key (KMS charges apply). set it to false for AWS owned key."""
254
-
255
- Enabled: bool
256
- SSEType: Literal['KMS']
257
- KMSMasterKeyId: str
258
-
259
-
260
- class TimeToLiveSpecification(TypedDict):
261
- AttributeName: str # The name of the TTL attribute used to store the expiration time for items
262
- Enabled: bool # Indicates whether TTL is enabled (true) or disabled (false) on the table
263
-
264
-
265
- class GetResourcePolicyInput(TypedDict):
266
- ResourceArn: str # The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy is attached
267
-
268
-
269
- class PutResourcePolicyInput(TypedDict, total=False):
270
- Policy: str # An AWS resource-based policy document in JSON format
271
- ResourceArn: str # The Amazon Resource Name (ARN) of the DynamoDB resource to which the policy will be attached
272
- ConfirmRemoveSelfResourceAccess: (
273
- bool # Set to true to confirm removing your permissions to change the policy in the future
274
- )
275
- ExpectedRevisionId: str # A string value for conditional updates of your policy
276
-
277
-
278
- class OnDemandThroughputOverride(TypedDict):
279
- MaxReadRequestUnits: int
280
-
281
-
282
- class ProvisionedThroughputOverride(TypedDict):
283
- ReadCapacityUnits: int
284
-
285
-
286
- class ReplicaCreate(TypedDict, total=False):
287
- RegionName: str
288
- KMSMasterKeyId: str
289
-
290
-
291
- class ReplicaDelete(TypedDict):
292
- RegionName: str
293
-
294
-
295
- class ReplicaUpdate(TypedDict, total=False):
296
- KMSMasterKeyId: str
297
- OnDemandThroughputOverride: OnDemandThroughputOverride
298
- ProvisionedThroughputOverride: ProvisionedThroughputOverride
299
- RegionName: str
300
- TableClassOverride: Literal['STANDARD', 'STANDARD_INFREQUENT_ACCESS']
301
-
302
-
303
- class ReplicationGroupUpdate(TypedDict, total=False):
304
- Create: ReplicaCreate
305
- Update: ReplicaUpdate
306
- Delete: ReplicaDelete
307
-
308
-
309
- class CreateTableInput(TypedDict, total=False):
310
- """Parameters for CreateTable operation."""
311
-
312
- TableName: str # required
313
- AttributeDefinitions: List[AttributeDefinition] # required
314
- KeySchema: List[KeySchemaElement] # required
315
- BillingMode: Literal['PROVISIONED', 'PAY_PER_REQUEST']
316
- GlobalSecondaryIndexes: List[GlobalSecondaryIndex]
317
- ProvisionedThroughput: ProvisionedThroughput
318
-
319
-
320
- class UpdateTableInput(TypedDict, total=False):
321
- """Parameters for UpdateTable operation."""
322
-
323
- TableName: str # required
324
- AttributeDefinitions: List[AttributeDefinition]
325
- BillingMode: Literal['PROVISIONED', 'PAY_PER_REQUEST']
326
- DeletionProtectionEnabled: bool
327
- GlobalSecondaryIndexUpdates: List[GlobalSecondaryIndexUpdate]
328
- OnDemandThroughput: OnDemandThroughput
329
- ProvisionedThroughput: ProvisionedThroughput
330
- ReplicaUpdates: List[ReplicationGroupUpdate]
331
- SSESpecification: SSESpecification
332
- StreamSpecification: StreamSpecification
333
- TableClass: Literal['STANDARD', 'STANDARD_INFREQUENT_ACCESS']
334
- WarmThroughput: WarmThroughput