I would like to develop an apps using python/webapp2, which is required SQL Azure database hosted in Azure Cloud. How can i connect python to SQL Azure?
3
-
Have you checked Windows Azure: Python Developer Center?Pedro Romano– Pedro Romano2012-11-05 09:55:55 +00:00Commented Nov 5, 2012 at 9:55
-
Yes, i did. Can't find any tutorial there. They do have tutorial for MySQL, but SQL Azure.Danny Hong– Danny Hong2012-11-05 09:58:12 +00:00Commented Nov 5, 2012 at 9:58
-
1Python App using storage?Pedro Romano– Pedro Romano2012-11-05 10:40:16 +00:00Commented Nov 5, 2012 at 10:40
Add a comment
|
1 Answer
Try pyodbc with FreeTDS and format your connection string as explained in this answer:
TDSVER=8.0 tsql -H XXXXXXXX.database.windows.net -U Username -D DatabaseName -p 1433 -P Password
Also make sure that you configure SQL Azure correctly in order to allow your IP to access the database.