Docker Registry Client
A Python REST client for the Docker Registry
It's useful for automating image tagging and untagging
Usage
The API provides several classes: DockerRegistryClient
, Repository
, and Image
.
DockerRegistryClient
has the following methods:
-
namespaces()
-> a list of all namespaces in the registry -
repository(repository_name, namespace)
-> the corresponding repository object -
repositories()
-> all repositories in the registry
Repository
has the following methods:
-
tags()
-> a list of all tags in the repository -
data(tag)
-> json data associated withtag
-
image(tag)
-> the image associated withtag
-
untag(tag)
-> removetag
from the repository -
tag(tag, image_id)
-> applytag
toimage_id
Image
has the following methods:
-
get_layer()
-> binary layer data for image -
get_json()
-> json metadata for image -
get_data(field)
-> single field from json data -
ancestry()
-> ids for image ancestors
Alternatives
- python-dxf (only supports V2)