Db¶
DynamoDb¶
A very simple CRUD module for DynamoDB. You will certainly want to do more that what is available here. On the other hand, there is enough here to do simple proof of concept type builds where you just want to show that you are getting data in the database.
-
class
AwAws.Db.dynamodb.
DynamoDb
(table_name, region_name=None)¶ - Parameters
table_name – set dynamodb to use
region_name – the region we are running in
Note
self.table: contains ref to dynamo table resource
-
delete_item
(primary_key_id)¶ delete an item from a dynamo table by primary key id
-
get_item
(primary_key_id)¶ get an item from a dynamo table by primary key id
-
put_item
(item)¶ put item in dynamoDb table
-
query_by_partition_and_sort_key
(partition_key, partition_key_value, sort_key, sort_key_value)¶ get a list of items by primary_key and sort_key
-
query_by_partition_key
(partition_key, partition_key_value=None)¶ get a list of items by primary_key and sort_key