Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,73 @@ As the maintainer of this project, please make a few updates:
- Understanding the security reporting process in SECURITY.MD
- Remove this section from the README

# Readme

The Microsoft mssql-python module is a powerful, user-friendly Python driver designed for seamless interaction with Microsoft SQL Server, Azure SQL Database, and Azure SQL Managed Instance databases. This driver is crafted to adhere to the DB API 2.0 specification while incorporating additional Pythonic features that enhance its ease of use and functionality. The driver offers comprehensive functionalities, including establishing connections, executing queries, and managing transactions among many other features.

## Key Features

### DBAPI v2.0 Compliance

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:

- **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.

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.

### Ease of Installation

- **pip install**: The easiest way to install mssql-python is through the Python package manager, pip, irrespective of the Operating System. This ensures a quick and straightforward setup process without the need for additional tools, software, or compilers.
```bash
pip install mssql-python
```

- **Offline install using zip file**: Another way of installing the driver is using a .zip file which can be downloaded from here [TODO: Link of the zip file].
- [TODO] - Steps to follow to install the driver using .zip file.

### Platform Compatibility

The current release of mssql-python is tailored for the Windows platform. Future updates will extend compatibility to Mac and Linux, ensuring a consistent installation experience and feature set across all platforms. Stay tuned for more updates in this space.

### Support for Microsoft Entra ID Authentication

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.

### Enhanced Pythonic Features

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.

### Example Usage

Below is a simple example demonstrating how to establish a connection and execute a query using mssql-python:

```python
import mssql_python

# Establish a connection
connection = mssql_python.connect(
server='your_server',
database='your_database',
username='your_username',
password='your_password'
)

# Execute a query
cursor = connection.cursor()
cursor.execute("SELECT * FROM your_table")
rows = cursor.fetchall()

for row in rows:
print(row)

# Close the connection
connection.close()
```

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Expand Down