def get_history_table():
  """Build the history table, depending on the environment."""
  if False: #os.environ.get('SERVER_SOFTWARE', '').startswith('Development'):
    logging.info('Using local dynamodb.')
    connection = layer1.DynamoDBConnection(
        region='anything',
        host='localhost',
        port=8100,
        aws_access_key_id='anything',
        aws_secret_access_key='anything',
        is_secure=False
    )
  else:
    from common import creds
    connection = boto.dynamodb2.connect_to_region(
        'us-east-1',
        aws_access_key_id=creds.AWS_ACCESS_KEY_ID,
        aws_secret_access_key=creds.AWS_SECRET_ACCESS_KEY,
    )

  if TABLE_NAME in connection.list_tables()['TableNames']:
    history_table = table.Table(
        TABLE_NAME,
        schema=SCHEMA,
        throughput=THROUGHPUT,
        indexes=INDEXES,
        connection=connection)
  else:
    history_table = table.Table.create(
        TABLE_NAME,
        schema=SCHEMA,
        throughput=THROUGHPUT,
        indexes=INDEXES,
        connection=connection)

  return history_table
dataset/ETHPy150Open tomwilkie/awesomation/src/appengine/history.py/get_history_table/original