first
This commit is contained in:
1 parent
bd96d4b779
commit
d09a433de5
7 files changed
+100
-1
No files matched your search
@@ -0,0 +1,28 @@
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
|
||||
class ImportDotenv:
|
||||
|
||||
def __init__(self):
|
||||
# Load Environment Variables from .env File
|
||||
load_dotenv()
|
||||
|
||||
# Load Global Variable from .env File
|
||||
self.dotenv_vars = {
|
||||
# SSH Connection Variables
|
||||
"REMOTE_HOST": os.getenv('REMOTE_HOST'),
|
||||
"REMOTE_PORT": int(os.getenv('REMOTE_PORT')),
|
||||
"REMOTE_USERNAME": os.getenv('REMOTE_USERNAME'),
|
||||
"REMOTE_PASSWORD": os.getenv('REMOTE_PASSWORD'),
|
||||
"REMOTE_LOG_DIR": os.getenv('REMOTE_LOG_DIR'),
|
||||
"LOCAL_LOG_DIR": os.getenv('LOCAL_LOG_DIR'),
|
||||
|
||||
# Local Environments Variables
|
||||
"DATABASE_FILE": os.getenv('DATABASE_FILE'),
|
||||
"LOG_MODE": os.getenv('LOG_MODE'),
|
||||
"LOG_FILE": os.getenv('LOG_FILE')
|
||||
}
|
||||
|
||||
def get_dotenv_vars(self):
|
||||
return self.dotenv_vars
|
||||
|
||||
Reference in new issue
Block a user