azure-mgmt-sql
Microsoft Azure Sql Management Client Library for Python
What it is and what it does
azure-mgmt-sql is the official Azure SDK client library for managing SQL resources in Microsoft Azure. It exposes a large API surface covering databases, servers, elastic pools, failover groups, vulnerability assessments, and related infrastructure through the SqlManagementClient class. The package handles authentication via Microsoft Entra and abstracts the underlying REST API calls.
Typically used in infrastructure-as-code workflows, CI/CD pipelines, and automation scripts where you need to create, configure, monitor, or delete Azure SQL resources programmatically. Version 4.0.0 adds support for new resource types (distributed availability groups, IPv6 firewall rules, managed instance DTCs, and others) and extends existing models with system metadata and identity properties. The package requires Python 3.10+ and depends on azure-mgmt-core for common SDK patterns and isodate for date/time handling.
Use it for:
- Automate provisioning of Azure SQL databases and servers in infrastructure-as-code deployments.
- Build CI/CD pipelines that create test databases on demand and clean them up after test runs.
- Manage firewall rules, elastic pools, and failover groups across multiple Azure SQL instances.
- Query and configure vulnerability assessment baselines and security settings at scale.
- Monitor and update database encryption protectors and advanced threat protection policies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides programmatic management of Azure SQL resources—databases, servers, elastic pools, and related infrastructure—through the Azure SDK for Python.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and is the official Microsoft client for Azure SQL management. Install it if you need to programmatically manage Azure SQL resources; skip it if you only use the Azure Portal or CLI for SQL operations.
Install
azure-mgmt-sql on PyPI
pip
pip install azure-mgmt-sqluv
uv add azure-mgmt-sqlpoetry
poetry add azure-mgmt-sqlInstalling azure-mgmt-sql
Before you install
Low install friction; pure Python wheel with three lightweight runtime dependencies (isodate, azure-mgmt-core, typing-extensions). Actively maintained with recent release (44 days old) and ongoing repository activity.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most deployment contexts.
Quickstart
pip install azure-mgmt-sql
from azure.mgmt.sql import SqlManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = SqlManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Requires Python 3.10+; Azure subscription and environment variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID) must be configured for authentication.
Verify before relying
- Whether the package supports all Azure SQL resource types or if some operations require separate SDKs.
- Performance characteristics when managing large numbers of resources or complex multi-region deployments.
- Backward compatibility guarantees between major versions given the 4.0.0 release.
- Authentication setup requirements beyond environment variable configuration.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — isodate, azure-mgmt-core, typing-extensions |
| Maintenance | actively maintained — 44 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,095,534/month — #1,666 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_mgmt_sql-4.0.0-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
azure-mgmt-cosmosdbProvides programmatic management of Azure…
permissive · top 5,000 on PyPI
azure-mgmt-sqlvirtualmachineManages SQL Server virtual machines in…
permissive · top 5,000 on PyPI
rocksetPython client library for the Rockset API,…
permissive · top 15,000 on PyPI
azure-mgmt-mysqlflexibleserversProvides a Python client library for managing…
unclear · top 5,000 on PyPI
azure-mgmt-datamigrationManages Azure Data Migration resources and…
permissive · top 5,000 on PyPI
azure-cli-sqlA command-line module for the Azure CLI that…
permissive · top 15,000 on PyPI
azure-mgmt-webProvides programmatic management of Azure Web…
permissive · top 5,000 on PyPI
azure-mgmt-redisenterpriseManages Azure Redis Enterprise clusters and…
unclear · top 5,000 on PyPI
azure-mgmt-resourceProvides Python bindings to manage Azure…
permissive · top 1,000 on PyPI
azure-mgmt-resource-deploymentsManages Azure resource deployments…
permissive · top 5,000 on PyPI