azure-monitor-querymetrics
Microsoft Corporation Azure Monitor Query Metrics Client Library for Python
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later and Azure subscription with Monitoring Reader role authorization to read metrics data at the subscription level.
- 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 · maintenance · safety
MIT License (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2025-07-28 (382 days) · last repo commit 2026-08-14 · 5,588 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 86,250 downloads/mo, #13,877 on PyPI
Alternatives
Verify before relying
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)- 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
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 on this page. Verify before relying on it.
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
azure-monitor-querymetrics on PyPI
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.
Requires Python 3.9 or later and Azure subscription with Monitoring Reader role authorization to read metrics data at the subscription level.
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)
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 the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesisodateazure-coretyping-extensions |
| Maintenance | Actively maintained 382 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,250 / month, #13,877 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9 |
Evidence: azure_monitor_querymetrics-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “azure monitor metrics query”
- azure-monitor-querymetricsQuery and retrieve numerical metrics data from Azure Monitor for…
- azure-monitor-queryExecutes read-only queries against Azure Monitor's Logs data platform…
- azure-mgmt-monitorProvides programmatic access to Azure Monitor resources—alerts,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also azure-monitor-query · azure-mgmt-monitor · azure-monitor-ingestion · nextcloudmonitor · applicationinsights · netflix-spectator-py · awsme · azure-mgmt-resource-subscriptions · azure-monitor-opentelemetry-exporter · metricflow