# docker-registry-client-async
[](https://pypi.org/project/docker-registry-client-async)
[](https://github.com/crashvb/docker-registry-client-async/actions)
[](https://coveralls.io/github/crashvb/docker-registry-client-async)
[](https://pypi.org/project/docker-registry-client-async)
[](https://github.com/PyCQA/pylint)
[](https://github.com/psf/black)
[](https://github.com/crashvb/docker-registry-client-async/blob/master/LICENSE.md)
## Overview
An AIOHTTP based Python REST client for the Docker Registry.
## Getting Started
```python
import asyncio
import json
from docker_registry_client_async import DockerRegistryClientAsync, FormattedSHA256, ImageName, Manifest
async def get_config(drca: DockerRegistryClientAsync, image_name: ImageName, manifest: Manifest) -> bytes:
config_digest = FormattedSHA256.parse(manifest.get_json()["config"]["digest"])
result = await drca.get_blob(image_name, config_digest)
return json.loads(result["blob"].decode("utf-8"))
async def get_manifest(drca: DockerRegistryClientAsync, image_name: ImageName) -> Manifest:
result = await drca.get_manifest(image_name)
return result["manifest"]
async def main():
image_name = ImageName.parse("busybox:1.30.1")
async with DockerRegistryClientAsync() as drca:
manifest = await get_manifest(drca, image_name)
config = await get_config(drca, image_name, manifest)
print(config)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```
## Installation
### From [pypi.org](https://pypi.org/project/docker-registry-client-async/)
```
$ pip install docker_registry_client_async
```
### From source code
```bash
$ git clone https://github.com/crashvb/docker-registry-client-async
$ cd docker-registry-client-async
$ virtualenv env
$ source env/bin/activate
$ python -m pip install --editable .[dev]
```
### Environment Variables
| Variable | Default Value | Description |
| ---------| ------------- | ----------- |
| DRCA\_CACERTS | | The path to the certificate trust store.
| DRCA\_CHUNK\_SIZE | 2097152 | The chunk size to use then replicating content.
| DRCA\_CREDENTIALS\_STORE | ~/.docker/config.json | The credentials store from which to retrieve registry credentials.
| DRCA\_DEBUG | | Adds additional debug logging, mainly for troubleshooting and development.
| DRCA\_DEFAULT\_REGISTRY | index.docker.io | The default registry index to use when resolving image names.
| DRCA\_DEFAULT\_NAMESPACE | library | The default registry namespace to use when resolving image names.
| DRCA\_DEFAULT\_TAG | latest | The default image tag to use when resolving image names.
| DRCA\_PROTOCOL | https | The default transport protocol to when communicating with a registry.
## Development
[Source Control](https://github.com/crashvb/docker-registry-client-async)
Raw data
{
"_id": null,
"home_page": "https://github.com/crashvb/docker-registry-client-async",
"name": "docker-registry-client-async",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "async client docker docker-registry docker-registry-client registry registry-client",
"author": "Richard Davis",
"author_email": "crashvb@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f3/94/598cd08395f9747197aaec93bea948430dd6431a386dc479c75b0d37ac71/docker_registry_client_async-1.0.3.tar.gz",
"platform": null,
"description": "# docker-registry-client-async\n\n[](https://pypi.org/project/docker-registry-client-async)\n[](https://github.com/crashvb/docker-registry-client-async/actions)\n[](https://coveralls.io/github/crashvb/docker-registry-client-async)\n[](https://pypi.org/project/docker-registry-client-async)\n[](https://github.com/PyCQA/pylint)\n[](https://github.com/psf/black)\n[](https://github.com/crashvb/docker-registry-client-async/blob/master/LICENSE.md)\n\n## Overview\n\nAn AIOHTTP based Python REST client for the Docker Registry.\n\n## Getting Started\n\n```python\nimport asyncio\nimport json\nfrom docker_registry_client_async import DockerRegistryClientAsync, FormattedSHA256, ImageName, Manifest\n\nasync def get_config(drca: DockerRegistryClientAsync, image_name: ImageName, manifest: Manifest) -> bytes:\n config_digest = FormattedSHA256.parse(manifest.get_json()[\"config\"][\"digest\"])\n result = await drca.get_blob(image_name, config_digest)\n return json.loads(result[\"blob\"].decode(\"utf-8\"))\n\nasync def get_manifest(drca: DockerRegistryClientAsync, image_name: ImageName) -> Manifest:\n result = await drca.get_manifest(image_name)\n return result[\"manifest\"]\n\nasync def main():\n image_name = ImageName.parse(\"busybox:1.30.1\")\n async with DockerRegistryClientAsync() as drca:\n manifest = await get_manifest(drca, image_name)\n config = await get_config(drca, image_name, manifest)\n print(config)\n\nif __name__ == \"__main__\":\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n\n```\n\n## Installation\n### From [pypi.org](https://pypi.org/project/docker-registry-client-async/)\n\n```\n$ pip install docker_registry_client_async\n```\n\n### From source code\n\n```bash\n$ git clone https://github.com/crashvb/docker-registry-client-async\n$ cd docker-registry-client-async\n$ virtualenv env\n$ source env/bin/activate\n$ python -m pip install --editable .[dev]\n```\n\n### Environment Variables\n\n| Variable | Default Value | Description |\n| ---------| ------------- | ----------- |\n| DRCA\\_CACERTS | | The path to the certificate trust store.\n| DRCA\\_CHUNK\\_SIZE | 2097152 | The chunk size to use then replicating content.\n| DRCA\\_CREDENTIALS\\_STORE | ~/.docker/config.json | The credentials store from which to retrieve registry credentials.\n| DRCA\\_DEBUG | | Adds additional debug logging, mainly for troubleshooting and development.\n| DRCA\\_DEFAULT\\_REGISTRY | index.docker.io | The default registry index to use when resolving image names.\n| DRCA\\_DEFAULT\\_NAMESPACE | library | The default registry namespace to use when resolving image names.\n| DRCA\\_DEFAULT\\_TAG | latest | The default image tag to use when resolving image names.\n| DRCA\\_PROTOCOL | https | The default transport protocol to when communicating with a registry.\n\n## Development\n\n[Source Control](https://github.com/crashvb/docker-registry-client-async)\n\n\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "An AIOHTTP based Python REST client for the Docker Registry.",
"version": "1.0.3",
"project_urls": {
"Bug Reports": "https://github.com/crashvb/docker-registry-client-async/issues",
"Homepage": "https://github.com/crashvb/docker-registry-client-async",
"Source": "https://github.com/crashvb/docker-registry-client-async"
},
"split_keywords": [
"async",
"client",
"docker",
"docker-registry",
"docker-registry-client",
"registry",
"registry-client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d4b200dddfe340ba731d720e5c04000859a2582e49e74a913ae618be4bd550bc",
"md5": "6cc3862a304b236ac2f00f042cd681e0",
"sha256": "8fafcf5140094811de03605b384c203d0137321a96b6d194f7fde9c20a06a973"
},
"downloads": -1,
"filename": "docker_registry_client_async-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6cc3862a304b236ac2f00f042cd681e0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 53370,
"upload_time": "2025-08-05T11:36:51",
"upload_time_iso_8601": "2025-08-05T11:36:51.918182Z",
"url": "https://files.pythonhosted.org/packages/d4/b2/00dddfe340ba731d720e5c04000859a2582e49e74a913ae618be4bd550bc/docker_registry_client_async-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f394598cd08395f9747197aaec93bea948430dd6431a386dc479c75b0d37ac71",
"md5": "82c7013fa2095973dbdbc6721d87ab56",
"sha256": "dca2d937870b03b25e2ec036627755c81412c3b725b1a3ececb51a9b062d858a"
},
"downloads": -1,
"filename": "docker_registry_client_async-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "82c7013fa2095973dbdbc6721d87ab56",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 46100,
"upload_time": "2025-08-05T11:36:53",
"upload_time_iso_8601": "2025-08-05T11:36:53.724629Z",
"url": "https://files.pythonhosted.org/packages/f3/94/598cd08395f9747197aaec93bea948430dd6431a386dc479c75b0d37ac71/docker_registry_client_async-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-05 11:36:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "crashvb",
"github_project": "docker-registry-client-async",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "docker-registry-client-async"
}