def get_url():
    """Gets api url from url file

    Returns: (str) url
    """
    url = []
    url_name = ""
    # gets path of this script - OS independent
    path = dirname(abspath(getfile(currentframe()))) + "/.url.txt"
    try:
        # get appropriate api url
        with open(path) as f:
            url = [line.strip() for line in f]
        for u in url:
            if u.startswith("URL"):
                url_name = u.split('"')[1::2]
    except FileNotFoundError:
        print("Could not find url. Please make sure you've run the CLI "
              "tool and set up your url")
        quit("Exiting...")
    return url_name[0]
Gets api url from url file

    Returns: (str) url
    
chatgdb/utils.py