import boto3 from time import sleep DATABASE = 'test_db' PAGE_SIZE = 1000 class AthenaResult: def __init__(self, client, query_execution_id): self.client = client self.query_execution_id = query_execution_id self.next_token = False def __iter__(self): return self def __next__(self): if self.next_token is None: raise StopIteration kwargs = { "QueryExecutionId": self.query_execution_id, "MaxResults"