New to Python -- Help with SQL Server Connection?

Hi, I am new to Python and PyCharm, and I am interested in accessing data that I have currently stored in SQL Server.

I've established a JDBC connection through the GUI and my server is connected. I can directly manipulate the data through the Database Console.

How do I access the data from my Python code? I am having trouble finding the syntax for loading tables in local objects or even how to refer to them.

Thanks!!
2 comments
Comment actions Permalink
Wabi,

If you are talking specifically about Microsoft SQL Server, this page may help:

https://wiki.python.org/moin/SQL%20Server

If you want to use an ORM, SQLAlchemy is probably the best choice.

http://docs.sqlalchemy.org/en/rel_0_9/dialects/mssql.html
0
Comment actions Permalink
Hi, thanks for the help. I will look into these tools. However, I am already uses PyCharm's default database connection tool to connect to the database. Do you know what module this uses and how I can refer to the tables that I can view through the Database Console?

It seems like if I use SQLAlchemy there is no benefit in using PyCharm's built in database connection tool.
0

Please sign in to leave a comment.