MCPcopy Create free account
hub / github.com/docker/docker-py / version

Method version

docker/api/daemon.py:168–181  ·  view source on GitHub ↗

Returns version information from the server. Similar to the ``docker version`` command. Returns: (dict): The server version information Raises: :py:class:`docker.errors.APIError` If the server returns an error.

(self, api_version=True)

Source from the content-addressed store, hash-verified

166 return self._result(self._get(self._url('/_ping'))) == 'OK'
167
168 def version(self, api_version=True):
169 """
170 Returns version information from the server. Similar to the ``docker
171 version`` command.
172
173 Returns:
174 (dict): The server version information
175
176 Raises:
177 :py:class:`docker.errors.APIError`
178 If the server returns an error.
179 """
180 url = self._url("/version", versioned_api=api_version)
181 return self._result(self._get(url), json=True)

Callers 1

Calls 3

_urlMethod · 0.80
_resultMethod · 0.80
_getMethod · 0.80

Tested by

no test coverage detected