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

Function format_environment

docker/utils/utils.py:490–498  ·  view source on GitHub ↗
(environment)

Source from the content-addressed store, hash-verified

488
489
490def format_environment(environment):
491 def format_env(key, value):
492 if value is None:
493 return key
494 if isinstance(value, bytes):
495 value = value.decode('utf-8')
496
497 return f'{key}={value}'
498 return [format_env(*var) for var in iter(environment.items())]
499
500
501def format_extra_hosts(extra_hosts, task=False):

Callers 5

__init__Method · 0.85
__init__Method · 0.85

Calls 1

format_envFunction · 0.85