MCPcopy Index your code
hub / github.com/docker/docker-py / labels

Method labels

docker/models/containers.py:47–58  ·  view source on GitHub ↗

The labels of a container as dictionary.

(self)

Source from the content-addressed store, hash-verified

45
46 @property
47 def labels(self):
48 """
49 The labels of a container as dictionary.
50 """
51 try:
52 result = self.attrs['Config'].get('Labels')
53 return result or {}
54 except KeyError as ke:
55 raise DockerException(
56 'Label data is not available for sparse objects. Call reload()'
57 ' to retrieve all information'
58 ) from ke
59
60 @property
61 def status(self):

Callers

nothing calls this directly

Calls 2

DockerExceptionClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected