Created
February 6, 2022 17:27
-
-
Save YiLi225/dc65687cb637f0bd58eb1cc664c8681f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlalchemy as sa | |
import urllib | |
params = urllib.parse.quote_plus("DRIVER={SQL Server Native Client 11.0};" | |
"SERVER=localhost\SQLEXPRESS;" | |
"DATABASE=master;" | |
"Trusted_Connection=yes") | |
## Connect using the specified parameters | |
engine = sa.create_engine("mssql+pyodbc:///?odbc_connect={}".format(params)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment