def format_metadata_url(api_key, page_number):
 query_params = [('per_page', '100'), ('sort_by', 'id'), ('page', str(page_number)), ('database_code', 'WIKI')]
 if (api_key is not None):
  query_params = ([('api_key', api_key)] + query_params)
 return ('https://www.quandl.com/api/v3/datasets.csv?' + urlencode(query_params))

def format_metadata_url ( api_key , page_number ) : query_params = [ ( 'per_page' , '100' ) , ( 'sort_by' , 'id' ) , ( 'page' , str ( page_number ) ) , ( 'database_code' , 'WIKI' ) ] if ( api_key is not None ) : query_params = ( [ ( 'api_key' , api_key ) ] + query_params ) return ( 'https://www.quandl.com/api/v3/datasets.csv?' + urlencode ( query_params ) )
build the query rl for the quandl wiki metadata .