Skip to content

a16su/registry_client

Repository files navigation

Build Status

undone...

based on docker-registry-api

TODO

  • cli
  • more image format
  • stream transport

example

1. list tags

from registry_client.client import RegistryClient

client = RegistryClient(host="https://registry-1.docker.io",
                        username="",
                        password="")
tags = client.list_tags("hello-world")
print(tags)
# ['latest', 'linux', 'nanoserver', 'nanoserver-1709', 'nanoserver-1803', 'nanoserver-1809', 'nanoserver-ltsc2022', 'nanoserver-sac2016', 'nanoserver1709']

2. list repo

from registry_client.client import RegistryClient

client = RegistryClient(host="https://registry-1.docker.io",
                        username="your_username",
                        password="your_password")
repos = client.catalog()
print(repos)  # ['library/hello-world']

3. delete a image

from registry_client.client import RegistryClient

client = RegistryClient(host="https://registry-1.docker.io",
                        username="your_username",
                        password="your_password")
repos = client.delete_image(
    image_name="repo/hello-world@sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4"
)

Credits

Thanks Jetbranins for their support of registry_client with awwsome suit for IDEs, visit Jetbrains Open Source Support for more info
JetBrains JetBrains JetBrains

About

Docker Registry Python Client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published