NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1330 most downloaded on PyPI
Microsoft Corporation Azure Monitor Query Client Library for Python
Last release 1 years ago
30 Jul 2025
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 12 of 12 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
18 releases · first in 2021
One column per quarter.
MetricsClient and MetricsQueryClient have been removed from the azure-monitor-query package. This is part of the migration to split logs and metrics f
MetricsClient and MetricsQueryClient have been removed from the azure-monitor-query package. This is part of the migration to split logs and metrics functionality into separate packages. (#42205)
MetricsClient has been moved to the new azure-monitor-querymetrics package.MetricsQueryClient can be access through the azure-mgmt-monitor package.azure-core to >=1.30.0isodate to >=0.6.1typing-extensions to >=4.6.0Internal updates for linting and typing improvements.
An audience keyword argument can now be passed to the MetricsClient constructor to specify the audience for the authentication token. This is useful w
audience keyword argument can now be passed to the MetricsClient constructor to specify the audience for the authentication token. This is useful when querying metrics in sovereign clouds. (#35502)Added roll_up_by keyword argument to MetricsClient.query_resources to support rolling up metrics by dimension.
roll_up_by keyword argument to MetricsClient.query_resources to support rolling up metrics by dimension. (#33752)1.3.0b2/1.3.0b1):
MetricsBatchQueryClient has been renamed to MetricsClient. (#33958)MetricsClient constructor so that endpoint is now the first positional argument. (#33752)MetricsClient.query_resources are now required keyword-only arguments. (#33958)resource_uris argument in MetricsClient.query_resources has been renamed to resource_ids. (#34760)Internal updates to generated code.
azure-core to >=1.28.0.Added MetricsBatchQueryClient to support batch querying metrics from Azure resources.
MetricsBatchQueryClient to support batch querying metrics from Azure resources. (#31049)Fixed certain keyword arguments from not being propagated when using MetricsQueryClient.
MetricsQueryClient.azure-core to >=1.28.0.Add the query_resource method to LogsQueryClient to allow users to query Azure resources directly without the context of a workspace.
query_resource method to LogsQueryClient to allow users to query Azure resources directly without the context of a workspace. (#29365)LogsTable constructor, changing column_types to columns_types. Note that this is a class that is typically only instantiated internally, and not by users. (#29076)Code | Docs
Support: Active
Azure Blob Storage Checkpoint Store AIO
azure-eventhub-checkpointstoreblob-aio
Fixed a bug where the incorrect key time_stamp (should be timeStamp) was used in the creation of MetricValue objects (thanks @jamespic).
time_stamp (should be timeStamp) was used in the creation of MetricValue objects (thanks @jamespic). (#28777)Error details are now propagated inside the LogsQueryError object.
LogsQueryError object. (#25137)msrest dependency.azure-core to >=1.24.0.isodate>=0.6.0 (isodate was required by msrest).typing-extensions>=4.0.1.Fixed a bug where query_resource in metrics client is throwing an error with unexpected metric_namespace argument.
query_resource in metrics client is throwing an error with unexpected metric_namespace argument.This version and all future versions will require Python 3.6+. Python 2.7 is no longer supported.
Fixed a bug where Metadata values in timestamp don't show up sometimes.
Added LogsQueryPartialResult and LogsQueryError to handle errors.
LogsQueryPartialResult and LogsQueryError to handle errors.status attribute to LogsQueryResult.LogsQueryStatus Enum to describe the status of a result.LogsTableRow type that represents a single row in a table.metrics list in MetricsQueryResult can now be accessed by metric names.LogsQueryResult now iterates over the tables directly as a convenience.query API in logs is renamed to query_workspacequery API in metrics is renamed to query_resourcequery_workspace API now returns a union of LogsQueryPartialResult and LogsQueryResult.query_batch API now returns a union of LogsQueryPartialResult, LogsQueryError and LogsQueryResult.metric_namespace is renamed to namespace and is a keyword-only argument in list_metric_definitions API.MetricsResult is renamed to MetricsQueryResult.Added additional display_description attribute to the Metric type.
display_description attribute to the Metric type.MetricClass enum to provide the class of a metric.metric_class attribute to the MetricDefinition type.MetricNamespaceClassification enum to support the namespace_classification attribute on MetricNamespace type.MetricUnit enum to describe the unit of the metric.batch_query to query_batch.LogsBatchQueryRequest to LogsBatchQuery.include_render is now renamed to include_visualization in the query API.LogsQueryResult now returns visualization instead of render.start_time, duration and end_time are now replaced with a single param called timespanresourceregion is renamed to resource_region in the MetricResult type.top is renamed to max_results in the metric's query API.metric_namespace_name is renamed to fully_qualified_namespaceis_dimension_required is renamed to dimension_requiredinterval and time_grain are renamed to granularityorderby is renamed to order_byLogsQueryResult now returns datetime objects for a time values.LogsBatchQuery doesn't accept a request_id anymore.MetricsMetadataValues is removed. A dictionary is used instead.time_stamp is renamed to timestamp in MetricValue type.AggregationType is renamed to MetricAggregationType.LogsBatchResultError type.LogsQueryResultTable is named to LogsTableLogsTableColumn is now removed. Column labels are strings instead.start_time in list_metric_namespaces API is now a datetime.LogsBatchQuery is changed. Also, headers is no longer accepted.timespan is now a required keyword-only argument in logs APIs.LogsQueryResult objects.include_statistics and include_visualization args can now work together.Added enum AggregationType which can be used to specify aggregations in the query API.
AggregationType which can be used to specify aggregations in the query API.LogsBatchQueryResult model that is returned for a logs batch query.error attribute to LogsQueryResult.aggregation param in the query API is renamed to aggregationsbatch_query API now returns a list of responses.LogsBatchResults model is now removed.LogsQueryRequest is renamed to LogsBatchQueryRequestLogsQueryResults is now renamed to LogsQueryResultLogsBatchQueryResult now has 4 additional attributes - tables, error, statistics and render instead of body attribute.workspaces, workspace_ids, qualified_names and azure_resource_ids are now merged into a single additional_workspaces list in the query API.
workspaces, workspace_ids, qualified_names and azure_resource_ids are now merged into a single additional_workspaces list in the query API.LogQueryRequest object now takes in a workspace_id and additional_workspaces instead of workspace.aggregation param is now a list instead of a string in the query method.duration must now be provided as a timedelta instead of a string.Version (1.0.0b1) is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Monitor Query. For more informat
Features
~azure.monitor.query.LogsQueryClient to query log analytics along with ~azure.monitor.query.aio.LogsQueryClient.~azure.monitor.query.MetricsQueryClient for querying metrics, listing namespaces and metric definitions along with ~azure.monitor.query.aio.MetricsQueryClient.Your coding agent can read these notes before it upgrades. Set up the MCP server →