Python SQL driver

Install SQL driver for Python

You can connect to a SQL Database using Python on Windows, Linux, or macOS.

Getting started

There are several python SQL drivers available. However, Microsoft places its testing efforts and its confidence in pyodbc driver. Choose one of the following drivers, and configure your development environment:


For documentation, see Python documentation at


Next steps

Explore samples that use Python to connect to a SQL database in the following articles: