import requests


def get_country_details(country_name):
    """Fetches country details from restcountries API.

    Args:
        country_name (str): Country name.

    Returns:
        (dict) API response.

    """
    r = requests.get(f"https://restcountries.eu/rest/v2/name/{country_name}")
    r.raise_for_status()

    return r.json()