Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit

Permalink
Read env variables directly instead of file
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostwriternr committed May 19, 2018
1 parent f5a50e4 commit f8cf2ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ venv.bak/

# mypy
.mypy_cache/

# Spotify credentials cache
.cache-*
5 changes: 0 additions & 5 deletions youtube_music_metadata/addons/musixmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
Musixmatch setup
"""
import os
from os.path import abspath, dirname, join
from dotenv import load_dotenv
import requests

DOTENV_PATH = join(dirname(dirname(dirname(abspath(__file__)))), '.env')
load_dotenv(DOTENV_PATH)

REQ_SESSION = requests.Session()
MUSIXMATCH_BASE_URL = "http://api.musixmatch.com/ws/1.1/"
MM_API_KEY = os.environ.get("MUSIXMATCH_API_KEY")
Expand Down
5 changes: 0 additions & 5 deletions youtube_music_metadata/addons/spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
Spotify setup
"""
import os
from os.path import abspath, dirname, join
import spotipy
import spotipy.util as spotipy_util
from dotenv import load_dotenv

DOTENV_PATH = join(dirname(dirname(dirname(abspath(__file__)))), '.env')
load_dotenv(DOTENV_PATH)

SPOTIFY_CLIENT_ID = os.environ.get("SPOTIFY_CLIENT_ID")
SPOTIFY_CLIENT_SECRET = os.environ.get("SPOTIFY_CLIENT_SECRET")
Expand Down

0 comments on commit f8cf2ac

Please sign in to comment.