| title | Python drivers for SQL Server |
|---|---|
| description | Connect to a SQL Database using one of the available Python drivers on your preferred operating system. |
| author | dlevy-msft-sql |
| ms.author | dlevy |
| ms.reviewer | vanto, randolphwest |
| ms.date | 08/07/2025 |
| ms.service | sql |
| ms.subservice | connectivity |
| ms.topic | conceptual |
You can connect to a SQL Database using Python on Windows, Linux, or macOS.
There are several python SQL drivers available. The mssql-python driver is the only first-party driver. Choose one of the following drivers, and configure your development environment:
For documentation, see Python documentation at Python.org.
Explore samples that use Python to connect to a SQL database in the following articles: