예제 #1
0
 def get_and_save_access_code(self, user_id, command):
   response = os.popen(command).read()
   # response = json.loads(response)
   print("get_and_save_access_code:")
   print(command)
   print(response)
   dynamodb.update_user(user_id, self.auth_key(), response)
   response = json.loads(response)
   #todo can we bunch this?
   self.save_credentials(user_id, response)
   return dynamodb.get_item(user_id)
예제 #2
0
def main():
    region="eu-west-1"
    con = dynamodb.connect_dynamodb(region)

    table = dynamodb.get_table(con, "testingc")
    print table 

    the_item = dynamodb.get_item(table, 1)
    print the_item

    item_attrs = {}
    item_attrs['length'] = 177 
    item_attrs['name'] = "kerst" 
    item_attrs['lastname'] = "man" 
    item_attrs['city'] = "zuidpool" 
    result = dynamodb.set_item(table, 5, item_attrs)

    print result
예제 #3
0
def test_user():
    return dynamodb.get_item("QC9PVI")
예제 #4
0
def test_user():
    return dynamodb.get_item("XB29T8")
def get_item():
    return dynamodb.get_item(project, type)