-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.py
32 lines (27 loc) · 918 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
31
32
import os # Module allowing our application to interact with the operating system dependent functionality.
class Config:
'''
General configuration parent class
'''
NEWS_SOURCES_BASE_URL = 'https://newsapi.org/v1/sources?language=en&category={}'
NEWS_ARTICLES_BASE_URL = 'https://newsapi.org/v1/articles?source={}&apiKey={}'
NEWS_API_KEY = os.environ.get('NEWS_API_KEY')
class ProdConfig(Config):
'''
Production configuration child class
Args:
Config: The parent configuration class with General configuration settings
'''
pass
class DevConfig(Config):
'''
Development configuration child class
Args:
Config: The parent configuration class with General configuration settings
'''
DEBUG = True
config_options = {
# A to help us access different configuration option classes.
'development' : DevConfig,
'production' : ProdConfig
}