File size: 312 Bytes
6369972
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""
PROMPT> python -m src.utils.get_env_as_string
"""
import os

def get_env_as_string():
    lines = []
    for key in sorted(os.environ.keys()):
        lines.append(f"{key}: {os.environ[key]}")
    return "\n".join(lines)

if __name__ == "__main__":
    env_string = get_env_as_string()
    print(env_string)