-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
46 lines (35 loc) · 942 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3
import os
class Config:
"""
Common configurations
Put any configurations here that are common across all environments
"""
DEBUG = False
TESTING = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
API_BASE = 'https://api.github.com/users/'
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI')
SECRET_KEY = os.environ.get('SECRET_KEY')
class DevelopmentConfig(Config):
"""
Development configurations
"""
SQLALCHEMY_ECHO = False
SECRET_KEY = "FakeK3y"
SQLALCHEMY_DATABASE_URI = 'sqlite:///gh-profiles.sqlite'
class TestingConfig(Config):
"""
Testing configurations
"""
TESTING = True
class ProductionConfig(Config):
"""
Production configurations
"""
DEBUG = False
app_config = {
'development': DevelopmentConfig,
'production': ProductionConfig,
'testing': TestingConfig,
}