Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from urllib.parse import quote_plus
- from sqlalchemy import create_engine
- conn = 'Driver={SQL Server Native Client 11.0};' \
- 'Server=ServerName;' \
- 'Database=DB_Name;' \
- 'Trusted_Connection=yes;'
- conn = quote_plus(conn)
- conn = create_engine('mssql+pyodbc:///?odbc_connect=%s' % conn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement