В результате выполнения:
...
if sys.platform == 'linux' or sys.platform == 'darwin':
driver = 'ODBC Driver 17 for SQL Server'
else:
driver = 'SQL Server'
connection_string = 'DRIVER={{{}}};SERVER={};DATABASE={};UID={};PWD={}'
con_string=connection_string.format(
driver,
config['host'],
config['database'],
config['user'],
config['password'])
> connection = pyodbc.connect(con_string)
Ошибка:
pyodbc.OperationalError: ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')