Skip to content

CosmoTech_Acceleration_Library.Accelerators.utils.multi_environment

MultiEnvironment

Source code in CosmoTech_Acceleration_Library/Accelerators/utils/multi_environment.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
class MultiEnvironment:

    def __init__(self):
        self.api_host = None
        self.api_scope = None

        for host_var in ['COSMOTECH_API_SCOPE', 'CSM_API_SCOPE']:
            if host_var in os.environ:
                self.api_scope = os.environ.get(host_var)
                break

        for host_var in ['COSMOTECH_API_HOST', 'COSMOTECH_API_URL', 'CSM_API_HOST', 'CSM_API_URL']:
            if host_var in os.environ:
                self.api_host = os.environ.get(host_var)
                break