MS SQL Server
Simply follow the steps below
Install pyodbc in python3
python3 -m pip install pyodbc
Now install Microsoft ODBC Driver (need to have Homebrew installed on your system)
brew tap microsoftmsodbcsql https://github.com/Microsoft/homebrew-msodbcsql
Now take idea from following python3 code
Hope it helps.