forked from OpenShiftDemos/os-sample-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlConfig.py
More file actions
25 lines (17 loc) · 883 Bytes
/
Copy pathsqlConfig.py
File metadata and controls
25 lines (17 loc) · 883 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
#!/usr/bin/env python
mssql = {'host': 'dbhost',
'user': 'dbuser',
'passwd': 'dbPwd',
'db': 'db'}
mysql = {'host': 'morfisem.mysql.pythonanywhere-services.com',
'user': 'morfisem',
'passwd': 'Flask4Ever!',
'db': '$fikadb'}
postgresql = {'host': 'packy.db.elephantsql.com',
'user': 'osulvond',
'passwd': '5DcllwBbzzR9FuWVu6vVsx68Ghto-8dd',
'db': 'osulvond'}
mssqlConfig = "mssql+pyodbc://{}:{}@{}:1433/{}?driver=SQL+Server+Native+Client+10.0".format(mssql['user'], mssql['passwd'], mssql['host'], mssql['db'])
postgresqlConfig = "postgresql+psycopg2://{}:{}@{}/{}".format(postgresql['user'], postgresql['passwd'], postgresql['host'], postgresql['db'])
sqliteConfig = "sqlite:///data.db"
mysqlConfig = "mysql://{}:{}@{}:3306/{}".format(mysql['user'], mysql['passwd'], mysql['host'], mysql['db'])