-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
29 lines (25 loc) · 721 Bytes
/
config.py
File metadata and controls
29 lines (25 loc) · 721 Bytes
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
import os
class Config:
'''
Config parent class
'''
NEWS_API_KEY = os.environ.get('HEADLINES_API_KEY')
HEADLINES_API_BASE_URL = "https://newsapi.org/v2/top-headlines?country=us&apiKey={}"
EVERYTHING_API_BASE_URL = "https://newsapi.org/v2/everything?q={}&apiKey={}"
SOURCES_API_BASE_URL = "https://newsapi.org/v2/sources?category={}&apiKey={}"
SOURCES_ARTICLE_API_BASE_URL = "https://newsapi.org/v2/top-headlines?id={}&apiKey={}"
class ProdConfig(Config):
'''
Production config child class
'''
pass
class DevConfig(Config):
'''
Development config child class
'''
pass
DEBUG = True
config_options = {
'development':DevConfig,
'production':ProdConfig
}