--- id: azure-monitor-querymetrics version: "1.0.0" license: MIT License license_treatment: permissive maintenance: active --- # azure-monitor-querymetrics — Microsoft Corporation Azure Monitor Query Metrics Client Library for Python License: permissive · Maintenance: active · Downloads: 86.2K/mo ## What it is and what it does This is the official Azure SDK client library for querying metrics from Azure Monitor's data platform. It provides both synchronous and asynchronous APIs to retrieve time-series numerical data from Azure resources. The library handles authentication via Azure credential objects and supports batch queries across multiple resources in a single request, making it efficient for monitoring and alerting workflows. The package wraps the Azure Monitor Metrics Data Plane API and returns structured response objects containing metric values organized by resource, metric name, and time series. It requires Python 3.9 or later, appropriate Azure role-based access, and knowledge of Azure resource IDs and metric namespaces. Async usage requires an additional transport library. Use it for: - Retrieve metrics from multiple Azure resources to build custom dashboards or reports - Programmatically fetch historical metric data for troubleshooting performance issues or capacity planning - Integrate Azure Monitor metrics into alerting systems that need to query multiple resources in batch - Build monitoring applications that aggregate metrics across resource groups - Export Azure resource metrics to external analytics or data warehousing systems ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Query and retrieve numerical metrics data from Azure Monitor for Azure resources, supporting batch queries across multiple resources with configurable aggregations and time ranges. Yes. This is a production-stable (1.0.0), actively maintained official Azure SDK library with no known vulnerabilities, permissive licensing, and low install friction. Install it if you need to query Azure Monitor metrics programmatically from Python; it is the standard way to do so within the Azure SDK ecosystem. ## Install pip install azure-monitor-querymetrics uv add azure-monitor-querymetrics poetry add azure-monitor-querymetrics ## Installing azure-monitor-querymetrics Before you install: Low install friction with three lightweight runtime dependencies (isodate, azure-core, typing-extensions). Active maintenance status with recent release history and no known vulnerabilities. License in practice: MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install azure-monitor-querymetrics from azure.identity import DefaultAzureCredential from azure.monitor.querymetrics import MetricsClient credential = DefaultAzureCredential() metrics_client = MetricsClient("https://westus3.metrics.monitor.azure.com", credential) Requires Python 3.9 or later and Azure subscription with Monitoring Reader role authorization to read metrics data at the subscription level. Verify before relying: - Whether the package supports querying metrics across Azure subscriptions or only within a single subscription - Performance characteristics when querying large numbers of resources or long time spans - Whether retry logic and rate-limiting are built-in or require manual handling ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 86.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags azure monitor metrics query, azure metrics client library, query azure resource metrics, azure monitoring data retrieval, azure metrics batch query, azure monitor time series data, azure resource performance metrics, azure-sdk, cloud-monitoring, time-series-data [View on SkillFed](https://skillfed.io/packages/azure-monitor-querymetrics) · [View on PyPI](https://pypi.org/project/azure-monitor-querymetrics/)