Skip to content

Instantly share code, notes, and snippets.

View karlduckett's full-sized avatar
🎯
Focusing

Karl Duckett karlduckett

🎯
Focusing
View GitHub Profile
@timmyreilly
timmyreilly / ConnectingToAzureSQLFromPython
Created October 13, 2017 23:02
Using Flask_SQLAlchemy to connect to Azure SQL
#!/usr/bin/env python
import os
import urllib.parse
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
# Configure Database URI:
params = urllib.parse.quote_plus("DRIVER={SQL Server};SERVER=sqlhost.database.windows.net;DATABASE=pythonSQL;UID=username@sqldb;PWD=password56789")