skills.vishalvoidskills/vishalvoid
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-py

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

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:

  1. 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: DefaultAzureCredential works as-is.
    • Production: set AZURE_TOKEN_CREDENTIALS=prod (or AZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.
  2. Wrap every client in a context manager so HTTP transports, sockets, and token caches are released deterministically:
Lines 1 - 25 of 263

Recommendations

Explore other random skills

All skillsMy patterns