-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.py
42 lines (34 loc) · 1 KB
/
config.example.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
class Config(object):
#Base flask config
DEBUG = True
DEVELOPMENT = True
HOST = '0.0.0.0'
PORT = '8080'
#db config
DB_SERVER = 'YOUR_DB_SERVER'
DB_PORT = 'YOUR_DB_PORT'
DB_NAME = 'YOUR_DB_NAME'
DB_USER = 'YOUR_DB_ADMIN'
DB_PASSWORD = 'YOUR_DB_PASSWORD'
#Connexion
CONNEXION_DIR = './'
CONNEXION_YAML = 'swagger.yaml'
#SQLAlchemy
SQLALCHEMY_TRACK_MODIFICATIONS = False
@property
def SQLALCHEMY_DATABASE_URI(self): # Note: all caps
return 'mysql+pymysql://{}:{}@{}:{}/navigator'.format(self.DB_USER, self.DB_PASSWORD, self.DB_SERVER, self.DB_PORT)
class ProductionConfig(Config):
"""Uses production database server."""
DEVELOPMENT = False
DEBUG = False
DB_SERVER = ''
class AwsConfig(Config):
"""Uses AWS rds server."""
class DevelopmentConfig(Config):
DB_SERVER = 'localhost'
DEBUG = True
class TestingConfig(Config):
DB_SERVER = 'localhost'
DEBUG = True
DATABASE_URI = 'sqlite:///:memory:'