| 
														
															@@ -126,14 +126,14 @@ class DynamoDBBackend(KeyValueStoreBackend): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def _get_client(self, access_key_id=None, secret_access_key=None): 
														 | 
														
														 | 
														
															     def _get_client(self, access_key_id=None, secret_access_key=None): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """Get client connection.""" 
														 | 
														
														 | 
														
															         """Get client connection.""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if self._client is None: 
														 | 
														
														 | 
														
															         if self._client is None: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            client_parameters = dict( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                region_name=self.aws_region 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            client_parameters = { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                'region_name': self.aws_region 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if access_key_id is not None: 
														 | 
														
														 | 
														
															             if access_key_id is not None: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                client_parameters.update(dict( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    aws_access_key_id=access_key_id, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    aws_secret_access_key=secret_access_key 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                )) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                client_parameters.update({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    'aws_access_key_id': access_key_id, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    'aws_secret_access_key': secret_access_key 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                }) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if self.endpoint_url is not None: 
														 | 
														
														 | 
														
															             if self.endpoint_url is not None: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 client_parameters['endpoint_url'] = self.endpoint_url 
														 | 
														
														 | 
														
															                 client_parameters['endpoint_url'] = self.endpoint_url 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -147,25 +147,25 @@ class DynamoDBBackend(KeyValueStoreBackend): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def _get_table_schema(self): 
														 | 
														
														 | 
														
															     def _get_table_schema(self): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """Get the boto3 structure describing the DynamoDB table schema.""" 
														 | 
														
														 | 
														
															         """Get the boto3 structure describing the DynamoDB table schema.""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return dict( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            AttributeDefinitions=[ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'AttributeDefinitions': [ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 { 
														 | 
														
														 | 
														
															                 { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     'AttributeName': self._key_field.name, 
														 | 
														
														 | 
														
															                     'AttributeName': self._key_field.name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     'AttributeType': self._key_field.data_type 
														 | 
														
														 | 
														
															                     'AttributeType': self._key_field.data_type 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             ], 
														 | 
														
														 | 
														
															             ], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            TableName=self.table_name, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            KeySchema=[ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'TableName': self.table_name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'KeySchema': [ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 { 
														 | 
														
														 | 
														
															                 { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     'AttributeName': self._key_field.name, 
														 | 
														
														 | 
														
															                     'AttributeName': self._key_field.name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     'KeyType': 'HASH' 
														 | 
														
														 | 
														
															                     'KeyType': 'HASH' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             ], 
														 | 
														
														 | 
														
															             ], 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ProvisionedThroughput={ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'ProvisionedThroughput': { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 'ReadCapacityUnits': self.read_capacity_units, 
														 | 
														
														 | 
														
															                 'ReadCapacityUnits': self.read_capacity_units, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 'WriteCapacityUnits': self.write_capacity_units 
														 | 
														
														 | 
														
															                 'WriteCapacityUnits': self.write_capacity_units 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def _get_or_create_table(self): 
														 | 
														
														 | 
														
															     def _get_or_create_table(self): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """Create table if not exists, otherwise return the description.""" 
														 | 
														
														 | 
														
															         """Create table if not exists, otherwise return the description.""" 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -215,20 +215,20 @@ class DynamoDBBackend(KeyValueStoreBackend): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def _prepare_get_request(self, key): 
														 | 
														
														 | 
														
															     def _prepare_get_request(self, key): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """Construct the item retrieval request parameters.""" 
														 | 
														
														 | 
														
															         """Construct the item retrieval request parameters.""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return dict( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            TableName=self.table_name, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            Key={ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'TableName': self.table_name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'Key': { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 self._key_field.name: { 
														 | 
														
														 | 
														
															                 self._key_field.name: { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     self._key_field.data_type: key 
														 | 
														
														 | 
														
															                     self._key_field.data_type: key 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def _prepare_put_request(self, key, value): 
														 | 
														
														 | 
														
															     def _prepare_put_request(self, key, value): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """Construct the item creation request parameters.""" 
														 | 
														
														 | 
														
															         """Construct the item creation request parameters.""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return dict( 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            TableName=self.table_name, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            Item={ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'TableName': self.table_name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            'Item': { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 self._key_field.name: { 
														 | 
														
														 | 
														
															                 self._key_field.name: { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     self._key_field.data_type: key 
														 | 
														
														 | 
														
															                     self._key_field.data_type: key 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 }, 
														 | 
														
														 | 
														
															                 }, 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -239,7 +239,7 @@ class DynamoDBBackend(KeyValueStoreBackend): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     self._timestamp_field.data_type: str(time()) 
														 | 
														
														 | 
														
															                     self._timestamp_field.data_type: str(time()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        ) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def _item_to_dict(self, raw_response): 
														 | 
														
														 | 
														
															     def _item_to_dict(self, raw_response): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         """Convert get_item() response to field-value pairs.""" 
														 | 
														
														 | 
														
															         """Convert get_item() response to field-value pairs.""" 
														 |