import json


def get_credentials(credentials_path="credentials.json"):
    """Access database credentials from JSON file

    Parameters
    ----------
    credentials_path : str
        Location of the credentials JSON file

    Returns
    -------
    credentials : dict
        Dictionary containing the database connection details
    """

    with open(credentials_path, "r") as f:
        credentials = json.load(f)

    return credentials