-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathconfig.py
More file actions
29 lines (26 loc) · 1.29 KB
/
config.py
File metadata and controls
29 lines (26 loc) · 1.29 KB
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
# DATABASE SETTINGS
pg_db_username = 'postgres'
pg_db_password = ''
pg_db_name = 'flasksqlalchemyrestfulapi'
pg_db_hostname = 'localhost'
# MYSQL
mysql_db_username = 'root'
mysql_db_password = ''
mysql_db_name = 'fscaffold'
mysql_db_hostname = 'localhost'
DEBUG = True
PORT = 5000
HOST = "127.0.0.1"
SQLALCHEMY_ECHO = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
SECRET_KEY = "SOME SECRET"
# PostgreSQL
SQLALCHEMY_DATABASE_URI = "postgresql://{DB_USER}:{DB_PASS}@{DB_ADDR}/{DB_NAME}".format(DB_USER=pg_db_username,
DB_PASS=pg_db_password,
DB_ADDR=pg_db_hostname,
DB_NAME=pg_db_name)
# MySQL
"""SQLALCHEMY_DATABASE_URI = "mysql+pymysql://{DB_USER}:{DB_PASS}@{DB_ADDR}/{DB_NAME}".format(DB_USER=mysql_db_username,
DB_PASS=mysql_db_password,
DB_ADDR=mysql_db_hostname,
DB_NAME=mysql_db_name)"""