Using azure-sdk-for-python with azure.com

Python integration

✓ Official SDK
Install
pip install azure-sdk-for-python
Quick start
import azure-sdk-for-python

# Use an OAuth2 access token
client = azure_sdk_for_python.Client(access_token="YOUR_ACCESS_TOKEN")
Gets a policy assignment by ID.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  /{policyAssignmentId}
Gets all the policy assignments for a subscription.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments
Gets all the policy definitions for a subscription.
curl \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policydefinitions
SDK on GitHub 📄 API Docs
SDK
azure-sdk-for-python
Python
API
azure.com
azure.com:resources-policy
At a glance
Language Python
Endpoints13
✓ Official