Created
January 30, 2020 20:25
-
-
Save bq1990/c83388d4856ee9eb2e5cad0d506745c4 to your computer and use it in GitHub Desktop.
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
from decimal import Decimal | |
import sys | |
import time | |
import boto3 | |
from boto3.dynamodb.conditions import Key | |
session = boto3.Session(profile_name='anil') | |
client = session.resource('dynamodb') | |
if len(sys.argv) != 2: | |
print('wrong number of args') | |
exit(0) | |
device_id = sys.argv[1] | |
vends_tbl = client.Table('%s_vends' % device_id) | |
vends = vends_tbl.query( | |
KeyConditionExpression=Key('product').eq('bag'), | |
) | |
print(vends) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment