Blog Post

SQL Server Blog
2 MIN READ

Introducing mssql-python alpha

pskountrianos's avatar
pskountrianos
Icon for Microsoft rankMicrosoft
Mar 11, 2025

Python Driver for SQL Server and Azure SQL!

We’re thrilled to announce the alpha release of our new open-source Python driver for Microsoft SQL Server and the Azure SQL family, now available on GitHub: mssql-python.

Built from the ground up, this driver offers Python developers a robust, efficient, and fully open-source solution for connecting to SQL Server and Azure SQL. Whether you're building data-driven applications, automating workflows, or leveraging advanced analytics, mssql-python is designed to provide a seamless and high-performance experience.

This is just the beginning—we’re excited to build this driver together with the community and would love your feedback!

Documentation | Release Notes | Roadmap

Join us in shaping the future of Python connectivity with SQL Server!

Key Features

  • Supported Platforms: Windows only (macOS and Linux support is coming soon)
  • Support for Microsoft Entra ID Authentication
  • Fully compliant with the DB API 2.0 specification. Key aspects include:
    • Connection Objects: Establishing and managing connections to the database.
    • Cursor Objects: Executing SQL commands and retrieving results.
    • Transaction Management: Supporting commit and rollback operations to ensure data integrity.
    • Error Handling: Providing a consistent set of exceptions for handling database errors.
    • Parameter Substitution: Allowing the use of placeholders in SQL queries to prevent SQL injection attacks.

What's Next?

We’re committed to continuously enhancing the mssql-python driver and value feedback from the community. 

Here's what the team is working on next:

Cross-Platform Support: MacOS and Linux Distributions

We are committed to providing cross-platform support for our Python driver. In the next few months, we will release versions compatible with MacOS and various Linux distributions.

Support for macOS (Issue #11)

Support for major Linux distributions (Issue #10)

Asynchronous Query Execution

Execute queries without blocking the main thread, perfect for applications requiring high concurrency and low latency.

True async query execution (Issue #9)

Connection Pooling

Improve performance by reusing existing connections rather than establishing new ones for every query.

Async built-in connection pool (Issue #8)

Try It and Share Your Feedback!

As this is an alpha release, your feedback is crucial. We invite you to:

  1. Try it out: Check-out the mssql-python driver and integrate it into your projects.
  2. Share your thoughts: Open issues, suggest features, and contribute to the project.
  3. Join the conversation: GitHub Discussions | SQL Server Tech Community.

We look forward to your feedback and collaboration!

Updated Mar 12, 2025
Version 16.0

1 Comment

  • BrunoGui's avatar
    BrunoGui
    Copper Contributor

    Sorry for being slightly off-topic, but could we get some news about the https://github.com/microsoft/msphpsql/issues/1523 on GitHub?