--- id: azure-mgmt-policyinsights version: "1.0.1" license: unclear license_treatment: unclear maintenance: active --- # azure-mgmt-policyinsights — Microsoft Azure Policyinsights Management Client Library for Python License: unclear · Maintenance: active · Downloads: 6.9M/mo ## 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 above — 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 pip install azure-mgmt-policyinsights uv add azure-mgmt-policyinsights 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_current - Install friction: low - Maintenance: active - Downloads: 6.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags azure policy compliance query, azure policy insights client, azure policy state management, azure policy events api, azure policy restrictions check, azure-sdk, policy-compliance [View on SkillFed](https://skillfed.io/packages/azure-mgmt-policyinsights) · [View on PyPI](https://pypi.org/project/azure-mgmt-policyinsights/)