Skip to content

Commit

Permalink
refac
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbck committed Jun 1, 2024
1 parent 8bab7a2 commit a2e11db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 3 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
load_dotenv(find_dotenv("./.env"))
except ImportError:
print("dotenv not installed, skipping...")

API_KEY = os.getenv("PIPELINES_API_KEY", "0p3n-w3bu!")
PIPELINES_DIR = os.getenv("PIPELINES_DIR", "./pipelines")
15 changes: 1 addition & 14 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,7 @@
import sys


####################################
# Load .env file
####################################

try:
from dotenv import load_dotenv, find_dotenv

load_dotenv(find_dotenv(".env"))
except ImportError:
print("dotenv not installed, skipping...")

API_KEY = os.getenv("PIPELINES_API_KEY", "0p3n-w3bu!")

PIPELINES_DIR = os.getenv("PIPELINES_DIR", "./pipelines")
from config import API_KEY, PIPELINES_DIR

if not os.path.exists(PIPELINES_DIR):
os.makedirs(PIPELINES_DIR)
Expand Down

0 comments on commit a2e11db

Please sign in to comment.