UsernameUtilities¶
This module contains function for logging into the database Functions and Classes ———————
-
databaseSettingsDict(db_dict)¶ Function for transfroming the database setting dict into a one that psycopg2 accepts.
Parameters: db_dict (dict) – Dict of from the database configuration file Returns: dict fitted for psycopg2.connect function
-
log2nordb(password=None)¶ Function that logs to database and returns a psycopg2 Connect object.
Returns: psycopg2.Connect object
-
log_to_active_database()¶ Function that logs, or tries to log, into the ‘active_database’ specifically. :return: psycopg2.Connect object
-
log_to_backup_database()¶ Function that logs, or tries to log, into the ‘active_database’ specifically. :return: psycopg2.Connect object