Technical & DevelopmentIntermediate
azure-containerregistry-py
Container image and registry management
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/microsoft/skills --skill azure-containerregistry-pynpx skills add https://github.com/microsoft/skills --skill azure-containerregistry-pyOr paste this URL into your assistant to install:
Overview
What This Skill Does
Python SDK for Azure Container Registry. Manages container images, repositories, tags, and manifests through the ContainerRegistryClient API. Supports both Entra ID and anonymous authentication.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
Azure Container Registry SDK for Python
Manage container images, artifacts, and repositories in Azure Container Registry.
Installation
pip install azure-containerregistry
Environment Variables
AZURE_CONTAINERREGISTRY_ENDPOINT=https://<registry-name>.azurecr.io # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
Authentication & Lifecycle
🔑 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:
Lines 1 - 25 of 263
Recommendations