|
1 | | -# Microsoft Python Data Provider for SQL Server |
| 1 | +# Microsoft Python Driver for SQL Server |
2 | 2 |
|
3 | | -**mssql-python** is a Python data provider for Microsoft SQL Server and the Azure SQL family of databases. It leverages Direct Database Connectivity (DDBC) that enables direct connections to SQL Server without requiring an external driver manager. Designed to comply with the [DB API 2.0](https://peps.python.org/pep-0249/) specification, this driver also introduces Pythonic enhancements for improved usability and functionality. It supports a full range of database operations, including connection management, query execution, and transaction handling. |
| 3 | +**mssql-python** is a Python driver for Microsoft SQL Server and the Azure SQL family of databases. It leverages Direct Database Connectivity (DDBC) that enables direct connections to SQL Server without requiring an external driver manager. Designed to comply with the [DB API 2.0](https://peps.python.org/pep-0249/) specification, this driver also introduces Pythonic enhancements for improved usability and functionality. It supports a full range of database operations, including connection management, query execution, and transaction handling. |
4 | 4 |
|
5 | | -Releases can be found on the [GitHub Releases](https://github.com/microsoft/mssql-python/releases) page. |
| 5 | +## Installation |
6 | 6 |
|
7 | | -## Supported Platforms |
| 7 | +mssql-python can be installed with [pip](http://pypi.python.org/pypi/pip) |
| 8 | +```bash |
| 9 | +pip install mssql-python |
| 10 | +``` |
| 11 | +## Key Features |
| 12 | +### Supported Platforms |
8 | 13 |
|
9 | 14 | Windows |
10 | 15 |
|
11 | 16 | > **Note:** |
12 | 17 | > Support for macOS and Linux is coming soon |
13 | 18 | > |
14 | | -## Installation |
15 | 19 |
|
16 | | -mssql-python can be installed with [pip](http://pypi.python.org/pypi/pip) |
17 | | -```bash |
18 | | -pip install mssql-python |
19 | | -``` |
| 20 | +### DBAPI v2.0 Compliance |
| 21 | + |
| 22 | +The Microsoft **mssql-python** module is designed to be fully compliant with the DB API 2.0 specification. This ensures that the driver adheres to a standardized interface for database access in Python, providing consistency and reliability across different database systems. Key aspects of DBAPI v2.0 compliance include: |
| 23 | + |
| 24 | +- **Connection Objects**: Establishing and managing connections to the database. |
| 25 | +- **Cursor Objects**: Executing SQL commands and retrieving results. |
| 26 | +- **Transaction Management**: Supporting commit and rollback operations to ensure data integrity. |
| 27 | +- **Error Handling**: Providing a consistent set of exceptions for handling database errors. |
| 28 | +- **Parameter Substitution**: Allowing the use of placeholders in SQL queries to prevent SQL injection attacks. |
| 29 | + |
| 30 | +By adhering to the DB API 2.0 specification, the mssql-python module ensures compatibility with a wide range of Python applications and frameworks, making it a versatile choice for developers working with Microsoft SQL Server, Azure SQL Database, and Azure SQL Managed Instance. |
| 31 | + |
| 32 | +### Support for Microsoft Entra ID Authentication |
| 33 | + |
| 34 | +The Microsoft mssql-python driver enables Python applications to connect to Microsoft SQL Server, Azure SQL Database, or Azure SQL Managed Instance using Microsoft Entra ID identities. It supports various authentication methods, including username and password, Microsoft Entra managed identity, and Integrated Windows Authentication in a federated, domain-joined environment. Additionally, the driver supports Microsoft Entra interactive authentication and Microsoft Entra managed identity authentication for both system-assigned and user-assigned managed identities. |
| 35 | + |
| 36 | +### Enhanced Pythonic Features |
20 | 37 |
|
21 | | -### Getting Started Examples |
| 38 | +The driver offers a suite of Pythonic enhancements that streamline database interactions, making it easier for developers to execute queries, manage connections, and handle data more efficiently. |
22 | 39 |
|
23 | | -- [ ] Why is it import mssql_python and not mssql-python? |
| 40 | +## Getting Started Examples |
| 41 | + |
| 42 | +- [ ] Question: Why is it import mssql_python and not mssql-python? |
24 | 43 |
|
25 | 44 | Connect to SQL Server and execute a simple query: |
26 | 45 |
|
@@ -48,29 +67,11 @@ connection.close() |
48 | 67 | ``` |
49 | 68 | ## Documentation |
50 | 69 |
|
51 | | -- [ ] Add link to the API documentation in Wiki |
| 70 | +- [ ] TODO: Add link to the API documentation in Wiki |
52 | 71 |
|
53 | | -## Key Features |
| 72 | +## Still have questions? |
54 | 73 |
|
55 | | -### DBAPI v2.0 Compliance |
56 | | - |
57 | | -The Microsoft **mssql-python** module is designed to be fully compliant with the DB API 2.0 specification. This ensures that the driver adheres to a standardized interface for database access in Python, providing consistency and reliability across different database systems. Key aspects of DBAPI v2.0 compliance include: |
58 | | - |
59 | | -- **Connection Objects**: Establishing and managing connections to the database. |
60 | | -- **Cursor Objects**: Executing SQL commands and retrieving results. |
61 | | -- **Transaction Management**: Supporting commit and rollback operations to ensure data integrity. |
62 | | -- **Error Handling**: Providing a consistent set of exceptions for handling database errors. |
63 | | -- **Parameter Substitution**: Allowing the use of placeholders in SQL queries to prevent SQL injection attacks. |
64 | | - |
65 | | -By adhering to the DB API 2.0 specification, the mssql-python module ensures compatibility with a wide range of Python applications and frameworks, making it a versatile choice for developers working with Microsoft SQL Server, Azure SQL Database, and Azure SQL Managed Instance. |
66 | | - |
67 | | -### Support for Microsoft Entra ID Authentication |
68 | | - |
69 | | -The Microsoft mssql-python driver enables Python applications to connect to Microsoft SQL Server, Azure SQL Database, or Azure SQL Managed Instance using Microsoft Entra ID identities. It supports various authentication methods, including username and password, Microsoft Entra managed identity, and Integrated Windows Authentication in a federated, domain-joined environment. Additionally, the driver supports Microsoft Entra interactive authentication and Microsoft Entra managed identity authentication for both system-assigned and user-assigned managed identities. |
70 | | - |
71 | | -### Enhanced Pythonic Features |
72 | | - |
73 | | -The driver offers a suite of Pythonic enhancements that streamline database interactions, making it easier for developers to execute queries, manage connections, and handle data more efficiently. |
| 74 | +Check out our [FAQ](https://github.com/microsoft/mssql-python/wiki/Frequently-Asked-Questions). Still not answered? Create an [issue](https://github.com/microsoft/mssql-python/issues/new/choose) to ask a question. |
74 | 75 |
|
75 | 76 | ## Contributing |
76 | 77 |
|
|
0 commit comments