def get_artist_dict(db_session):
    artist_dict = {}
    try:
        c = db_session.cursor()
        c.execute("""SELECT artist_id, name, custom_name FROM artists order by name""")
        for row in c:
            artist_id   = row[0]
            artist_name = row[1]
            custom_name = row[2]
            artist_dict[artist_id] = { 'name'        : artist_name,
                           'custom_name' : custom_name,
                        }
    except:
        artist_dict = None
    #db_session.commit()
    c.close()
    return artist_dict
Returns a dictionary of all the artists populated from the database.
dataset/ETHPy150Open bahamas10/Viridian/AmpacheTools/dbfunctions.py/get_artist_dict