import requests


def news_fetch(region,news_key):
    """This function fetches the data from the news"""
    #Allows for customizable API key and weather location.
    url = (f"http://newsapi.org/v2/top-headlines?country={region}&apiKey={news_key}")
    #Gets API with requests and convert to .json
    news_api = requests.get(url)
    news_json = news_api.json()
    return news_json