azure-containerregistry
Microsoft Azure Azure Container Registry Client Library for Python
What it is and what it does
Azure Container Registry is a Microsoft-managed service for storing and managing container images and OCI artifacts in a private registry. This client library provides Python bindings to interact with that registry—listing repositories, tags, and manifests; querying image metadata; setting read/write/delete permissions on artifacts; and deleting images, tags, or entire repositories. It wraps the Azure Container Registry REST API and integrates with Azure Identity for authentication via Azure Active Directory.
The library is designed for developers who need programmatic control over container images stored in Azure. It supports operations ranging from simple metadata queries to complex image lifecycle management, such as deleting old images while preserving the most recent versions. It has no runtime dependencies beyond the Azure SDK ecosystem (which is installed separately) and requires Python 3.7 or later.
Use it for:
- Automate cleanup of old container images in a registry, retaining only the most recent versions by digest or timestamp.
- Query image metadata and tags to verify which versions are deployed or to audit registry contents.
- Set or revoke read/write/delete permissions on specific images or artifacts for access control.
- List all repositories and their tags to build a registry inventory or integration with CI/CD pipelines.
- Upload custom OCI images and artifacts by managing blobs, manifests, and layer uploads programmatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Client library for managing container images, artifacts, and metadata in Azure Container Registry—list repositories and tags, query image properties, set access controls, and delete registry items.
Yes. Low install friction, no runtime dependencies, actively maintained, permissive MIT license, and production-stable status make it a straightforward choice for any Python project that needs to manage Azure Container Registry resources. Verify that your authentication environment (Azure credentials) is properly configured before use.
Install
azure-containerregistry on PyPI
pip
pip install azure-containerregistryuv
uv add azure-containerregistrypoetry
poetry add azure-containerregistryInstalling azure-containerregistry
Before you install
Low install friction; pure Python wheel with no runtime dependencies. Actively maintained as of 2026-08-14 with production-stable status. Requires Python 3.7 or later.
License in practice
MIT License (permissive); no restrictions on commercial or private use, modification, or redistribution.
Quickstart
pip install --pre azure-containerregistry
from azure.containerregistry import ContainerRegistryClient
from azure.identity import DefaultAzureCredential
endpoint = "https://mycontainerregistry.azurecr.io"
audience = "https://management.azure.com"
client = ContainerRegistryClient(endpoint, DefaultAzureCredential(), audience=audience)
for repo in client.list_repository_names():
print(repo)
Requires Azure subscription and an existing Container Registry account; AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET environment variables must be set for DefaultAzureCredential authentication.
Verify before relying
- Whether azure-identity is an optional or required dependency for all authentication flows.
- Support status for Python 3.7 given the package's latest release date (2023-07-11).
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,130 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,633,607/month — #3,704 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_containerregistry-1.2.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
azure-cli-acrProvides the Azure CLI 'acr' command module for…
permissive · top 15,000 on PyPI
container-inspectorAnalyzes Docker images, containers, and virtual…
permissive · top 15,000 on PyPI
docker-image-pyParses Docker image reference strings into…
permissive · top 5,000 on PyPI
python-dxfStores and retrieves arbitrary data blobs in…
permissive · top 15,000 on PyPI
orasORAS Python is an SDK that lets you push OCI…
permissive · top 5,000 on PyPI
azure-mgmt-containerregistryManages Azure Container Registry…
unclear · top 5,000 on PyPI
google-cloud-artifact-registryPython client library for Google Cloud Artifact…
permissive · top 5,000 on PyPI
azure-mgmt-containerregistrytasksProvides Python client library for managing…
unclear · top 5,000 on PyPI
azure-storage-blobClient library for uploading, downloading, and…
permissive · top 1,000 on PyPI
gtoGTO turns a Git repository into an artifact…
permissive · top 5,000 on PyPI