-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
30 lines (24 loc) · 822 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
from dotenv import load_dotenv
print("I made it into the config file!")
class Config:
FLASK_ENV =os.getenv('FLASK_ENV')
SECRET_KEY = os.getenv('SECRET_KEY')
FLASK_DEBUG = os.getenv('FLASK_DEBUG')
ENV_CERT_FILE = os.getenv('ENV_CERT_FILE')
ENV_KEY_FILE = os.getenv('ENV_KEY_FILE')
FS_TOK = os.getenv('FS_BEAR_TOKEN')
FS_API = os.getenv('FS_API_URL')
CP_API = os.getenv('ENV_CP_API_URL')
class DevelopmentConfig(Config):
DEBUG = True
class ProductionConfig(Config):
DEBUG = False
def load_environment():
environment = os.getenv('FLASK_ENV', 'development')
if environment == 'production':
print("Loading .env.production")
load_dotenv('.env.production')
else:
print("Loading .env.development")
load_dotenv('.env.development')