Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microsoft/azure-mgmt-apimanagement-py
Azure API Management SDK for Python.
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
and 4 more in the full report
7 fixed15 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
Which environment variable should be configured when running Azure SDK code in production using `DefaultAzureCredential` to restrict the credential chain to production-safe credentials?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies AZURE_TOKEN_CREDENTIALS. | Missed | Passed |
The instructions your model reads when the skill loads.
Manage Azure API Management services, APIs, products, and policies.
pip install azure-mgmt-apimanagement
pip install azure-identity
AZURE_SUBSCRIPTION_ID=your-subscription-id # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
🔑 Two rules apply to every code sample below:
- Prefer
DefaultAzureCredential. It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation.
- Local dev:
DefaultAzureCredentialworks as-is.- Production: set
AZURE_TOKEN_CREDENTIALS=prod(orAZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.- Wrap every client in a context manager so HTTP transports, sockets, and token caches are released deterministically:
- Sync:
with <Client>(...) as client:- Async:
async with <Client>(...) as client:andasync with DefaultAzureCredential() as credential:(fromazure.identity.aio)Snippets may abbreviate this setup, but production code should always follow both rules.
from azure.identity import DefaultAzureCredential
from azure.mgmt.apimanagement import ApiManagementClient
import os
with ApiManagementClient(
credential=DefaultAzureCredential(),
subscription_id=os.environ["AZURE_SUBSCRIPTION_ID"]
) as client:
test cases passed, vs 15 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.