def get_set()

in amazon_polly_async_batch/dynamo.py [0:0]


    def get_set(self, set_name):
        """
        Given a set ID returns that set record from Dynamo. Throws an exception if it's not found.
        :param set_name: the name of the set
        :return: the record
        """
        response = dynamodb.get_item(
            TableName=self.table_name,
            Key={'setName': {'S': set_name}}
        )
        if 'Item' in response:
            return response['Item']
        else:
            msg = 'Failed to load set {} from DynamoDb table {}'.format(set_name, self.table_name)
            raise Exception(msg)