MCPcopy
hub / github.com/docker/docker-py / from_dict

Method from_dict

docker/utils/proxy.py:25–38  ·  view source on GitHub ↗

Instantiate a new ProxyConfig from a dictionary that represents a client configuration, as described in `the documentation`_. .. _the documentation: https://docs.docker.com/network/proxy/#configure-the-docker-client

(config)

Source from the content-addressed store, hash-verified

23
24 @staticmethod
25 def from_dict(config):
26 '''
27 Instantiate a new ProxyConfig from a dictionary that represents a
28 client configuration, as described in `the documentation`_.
29
30 .. _the documentation:
31 https://docs.docker.com/network/proxy/#configure-the-docker-client
32 '''
33 return ProxyConfig(
34 http=config.get('httpProxy'),
35 https=config.get('httpsProxy'),
36 ftp=config.get('ftpProxy'),
37 no_proxy=config.get('noProxy'),
38 )
39
40 def get_environment(self):
41 '''

Callers 2

test_from_dictMethod · 0.80
__init__Method · 0.80

Calls 2

ProxyConfigClass · 0.85
getMethod · 0.45

Tested by 1

test_from_dictMethod · 0.64