The Microsoft Azure Container Registry Client Library for Python provides an interface to interact with Azure Container Registry (ACR) services. It allows developers to manage container images, repositories, and other artifacts stored in ACR. The library is currently at version 1.2.0 and follows the Azure SDK for Python's regular release cadence, ensuring updates and feature parity with the service.
pip install azure-containerregistry azure-identityVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to authenticate with Azure Container Registry using `DefaultAzureCredential` and then list all repository names within the specified registry. Ensure the `AZURE_CONTAINER_REGISTRY_URL` environment variable is set to your registry's URL (e.g., `https://myregistry.azurecr.io`) and that your authenticated identity has sufficient permissions (e.g., 'AcrPull' role).
Ensure `pip install azure-identity` is run and that your environment variables are correctly configured for `DefaultAzureCredential`, or explicitly pass other credential types. Refer to Azure Identity documentation for detailed setup.
Verify that the Azure AD principal used for authentication has the necessary permissions granted on the Azure Container Registry resource in the Azure portal or via Azure CLI/PowerShell.
If you intend to manage the ACR resource (e.g., create/delete registries, configure geo-replication), use `azure-mgmt-containerregistry`. If you need to push/pull images, list repositories, or manage manifests within an existing registry, use `azure-containerregistry`.