#NEWLINE# def main( ) : #NEWLINE# #INDENT# riotapi . set_region ( 'NA' ) #NEWLINE# riotapi . print_calls ( True ) #NEWLINE# key = os . environ [ 'DEV_KEY' ] #NEWLINE# riotapi . set_api_key ( key ) #NEWLINE# riotapi . set_load_policy ( LoadPolicy . eager ) #NEWLINE# db = SQLAlchemyDB ( 'mysql+mysqlconnector' , 'databse_hostname' , 'database_name' , 'username' , 'password' ) #NEWLINE# riotapi . set_data_store ( db ) #NEWLINE# master = [ entry . summoner for entry in riotapi . get_master ( ) ] #NEWLINE# print ( 'Pulled Master tier. Got {0} summoners.' . format ( len ( master ) ) ) #NEWLINE# gather_start = datetime ( 2015 , 7 , 23 ) #NEWLINE# for summoner in master : #NEWLINE# #INDENT# for match in summoner . match_list ( begin_time = gather_start ) : #NEWLINE# #INDENT# match = get_match ( match ) #NEWLINE# print ( 'Stored {0} in my database' . format ( match ) ) #NEWLINE# #UNINDENT# #UNINDENT# db . close ( )