def putData(recordId, direction): d = RemoteModel(key_name='%s_%s' % (recordId,direction)) d.rec_id = recordId d.rec_direction = direction d.put()