def __init__(self, params): host = params['host'] user = params['user'] password = params['password'] dbname = params['db'] conn = MySQLdb.connect(host=host, user=user, passwd=password, db=dbname) conn.autocommit(True) SQL.__init__(self, conn, '%s')
def __init__(self, params): file_path = params['db'] SQL.__init__(self, sqlite3.connect(file_path))