--- id: azure-monitor-query version: "2.0.0" license: MIT License license_treatment: permissive maintenance: active --- # azure-monitor-query — Microsoft Corporation Azure Monitor Query Client Library for Python License: permissive · Maintenance: active · Downloads: 10.6M/mo ## What it is and what it does Azure Monitor Query is a Python client library for querying logs stored in Azure Monitor's Logs data platform. It provides both synchronous and asynchronous interfaces to execute read-only Kusto Query Language queries against Log Analytics workspaces or individual Azure resources. The library handles authentication via Azure credentials (typically DefaultAzureCredential), manages timespan parameters, and returns structured query results as tables with rows and columns. The package is designed for developers who need to programmatically access Azure monitoring and diagnostic data. It consolidates log and performance data from multiple sources—platform logs, virtual machine agents, and application telemetry—into queryable results. As of version 2.0.0, metrics querying has been moved to separate packages (azure-monitor-querymetrics or azure-mgmt-monitor), so this library focuses exclusively on logs queries. Use it for: - Query Azure Log Analytics workspaces to retrieve application logs, performance metrics, and diagnostic data for analysis or reporting. - Build monitoring dashboards or alerting systems that pull data directly from Azure Monitor logs programmatically. - Perform resource-centric log queries on individual Azure resources without needing a dedicated Log Analytics workspace. - Implement batch log queries to retrieve multiple datasets in a single operation for bulk data export or analysis. - Integrate Azure monitoring data into Python-based data pipelines or ETL workflows using async clients for non-blocking I/O. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Executes read-only queries against Azure Monitor's Logs data platform using the Kusto Query Language, supporting both synchronous and asynchronous clients. Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and is production-stable. Install it if you need to query Azure Monitor logs from Python. Be aware that metrics querying is no longer included—use azure-monitor-querymetrics or azure-mgmt-monitor for that instead. ## Install pip install azure-monitor-query uv add azure-monitor-query poetry add azure-monitor-query ## Installing azure-monitor-query Before you install: Low install friction with three lightweight runtime dependencies (isodate, azure-core, typing-extensions). Actively maintained with recent releases; last commit 2026-08-14 and status marked active. License in practice: MIT License permits commercial use, modification, and distribution with minimal restrictions—suitable for most projects. Quickstart: pip install azure-monitor-query from azure.identity import DefaultAzureCredential from azure.monitor.query import LogsQueryClient credential = DefaultAzureCredential() client = LogsQueryClient(credential) response = client.query_workspace(workspace_id='', query='AzureActivity | take 5') Requires Python 3.9 or later; Azure credentials and a Log Analytics workspace or Azure resource are needed to execute queries. Verify before relying: - Whether the package handles large result sets efficiently or has row/response size limits beyond those mentioned in the service documentation. - Performance characteristics when querying across multiple workspaces simultaneously. - Whether async clients require additional setup beyond installing aiohttp. ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 10.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags azure monitor logs query, kusto query language python, azure log analytics client, azure monitoring sdk, query azure logs programmatically, azure-sdk, cloud-monitoring, kusto-query [View on SkillFed](https://skillfed.io/packages/azure-monitor-query) · [View on PyPI](https://pypi.org/project/azure-monitor-query/)