Created
March 4, 2016 15:39
-
-
Save chocksaway/958d49abfb02703b6a6d to your computer and use it in GitHub Desktop.
Python dynamo-db boto3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from boto3.dynamodb.conditions import Key, Attr | |
TABLE_NAME = 'int-mobileSubscriptionsTable' | |
dynamo_db = boto3.resource('dynamodb', endpoint_url='http://localhost:8090', region_name='us-east-1') | |
table = dynamo_db.Table(TABLE_NAME) | |
response = table.query( | |
KeyConditionExpression=Key('endpoint').eq('endpoint1') | |
) | |
for i in response['Items']: | |
print(i['endpoint']) | |
print(i['topicURN']) | |
print(i['bbcUserId']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment