2020-06-18 21:02:37 -04:00

23 lines
559 B
Python

import os
config = {
"DB": "musicbrainz_db",
"USER": "musicbrainz",
"PASSWORD": "musicbrainz",
"HOST": "127.0.0.1",
"PORT": 5432,
"LASTFM_APIKEY": os.environ.get("LASTFM_APIKEY"),
"LASTFM_USER": os.environ.get("LASTFM_USER"),
"SPOTIFY_CLIENTID": os.environ.get("SPOTIFY_CLIENTID"),
"SPOTIFY_SECRET": os.environ.get("SPOTIFY_SECRET"),
}
def connstr():
return " dbname=%s user=%s password=%s host=%s port=%d" % (
config["DB"], config["USER"], config["PASSWORD"],
config["HOST"], config["PORT"]
)