This commit is contained in:
adii1823
2021-10-28 17:37:54 +05:30
parent 8b802c5c62
commit ee641c189f
49 changed files with 601 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# parameters.variable.db.py
def connect(**options):
conn_params = {
'host': options.get('host', '127.0.0.1'),
'port': options.get('port', 5432),
'user': options.get('user', ''),
'pwd': options.get('pwd', ''),
}
print(conn_params)
# we then connect to the db (commented out)
# db.connect(**conn_params)
connect()
connect(host='127.0.0.42', port=5433)
connect(port=5431, user='fab', pwd='gandalf')