skillfed

azure-mgmt-policyinsights

Microsoft Azure Policyinsights Management Client Library for Python

azure-mgmt-policyinsights v1.0.1 6.9M downloads/30d#1,815 on PyPI5,588
License unclear Active released

What it is and what it does

azure-mgmt-policyinsights is the official Microsoft Azure SDK client library for querying and managing Azure Policy Insights. It exposes operations to retrieve policy compliance data, policy events, and policy restrictions across your Azure infrastructure. The library handles authentication via Azure Active Directory and provides a Pythonic interface to the Azure Policy Insights REST API.

The package is built on azure-mgmt-core and integrates with the broader Azure SDK ecosystem. It requires Python 3.9 or later and depends on isodate for date handling and typing-extensions for type hints. The library is actively maintained as part of the official Azure SDK for Python, with support for current Python versions.

Use it for:

  • Query policy compliance states and summaries across subscriptions, resource groups, or individual resources.
  • Retrieve policy events to audit when and why resources were evaluated against Azure policies.
  • Check policy restrictions to determine what actions are allowed on resources before attempting them.
  • Integrate policy insights into compliance dashboards or automated governance workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides programmatic access to Azure Policy Insights, allowing you to query policy compliance states, events, and restrictions across your Azure resources.

Yes. This is the official Azure SDK client for policy insights, actively maintained with no known vulnerabilities, low install friction, and broad Python version support. Install it if you need to programmatically query Azure policy compliance, events, or restrictions. The only caveat is that license treatment is unclear in the metadata.

Install

azure-mgmt-policyinsights on PyPI

pip

pip install azure-mgmt-policyinsights

uv

uv add azure-mgmt-policyinsights

poetry

poetry add azure-mgmt-policyinsights

Installing azure-mgmt-policyinsights

Before you install

Low friction: pure Python wheel with only three lightweight runtime dependencies (isodate, azure-mgmt-core, typing-extensions). Active maintenance with a recent release 87 days ago.

Quickstart

pip install azure-mgmt-policyinsights

from azure.mgmt.policyinsights import PolicyInsightsClient
from azure.identity import DefaultAzureCredential
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = PolicyInsightsClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

Requires Python 3.9+. Requires Azure subscription and environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID.

Verify before relying

  • Whether additional Azure SDK components are required for full functionality in production scenarios.
  • Performance characteristics when querying large numbers of policy compliance records or events.
  • Actual license terms, as license treatment is marked unclear in metadata.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 3 — isodate, azure-mgmt-core, typing-extensions
Maintenance actively maintained — 87 days since the last release
Last repo commit
First released
Downloads 6,908,048/month — #1,815 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: azure_mgmt_policyinsights-1.0.1-py3-none-any.whl

Keywords: azure, azure sdk

Development Status :: 5 - Production/StableProgramming 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

Tags

azure policy compliance queryazure policy insights clientazure policy state managementazure policy events apiazure policy restrictions check
azure-sdkpolicy-compliance

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

azure-mgmt-applicationinsights

Manages Azure Application Insights…

permissive · top 5,000 on PyPI

azure-mgmt-monitor

Provides programmatic access to Azure Monitor…

permissive · top 5,000 on PyPI

azure-mgmt-managementpartner

Provides a Python client library for managing…

unclear · top 5,000 on PyPI

azure-mgmt-msi

Manages Azure Managed Service Identities…

permissive · top 5,000 on PyPI

azure-mgmt-iothubprovisioningservices

Manages Azure IoT Hub Provisioning Services…

permissive · top 5,000 on PyPI

azure-mgmt-resourcegraph

Provides a Python client library to query and…

unclear · top 5,000 on PyPI

azure-mgmt-managedservices

Provides Python client library for managing…

unclear · top 15,000 on PyPI

azure-mgmt-commerce

Provides a Python client library for managing…

unclear · top 5,000 on PyPI

azure-mgmt-advisor

Provides Python bindings to interact with Azure…

unclear · top 5,000 on PyPI

azure-applicationinsights

Provides a Python client library for querying…

permissive · top 5,000 on PyPI