airbyte_cdk.utils.is_cloud_environment
1# 2# Copyright (c) 2023 Airbyte, Inc., all rights reserved. 3# 4 5import os 6 7CLOUD_DEPLOYMENT_MODE = "cloud" 8 9 10def is_cloud_environment() -> bool: 11 """ 12 Returns True if the connector is running in a cloud environment, False otherwise. 13 14 The function checks the value of the DEPLOYMENT_MODE environment variable which is set by the platform. 15 This function can be used to determine whether stricter security measures should be applied. 16 """ 17 deployment_mode = os.environ.get("DEPLOYMENT_MODE", "") 18 return deployment_mode.casefold() == CLOUD_DEPLOYMENT_MODE
CLOUD_DEPLOYMENT_MODE =
'cloud'
def
is_cloud_environment() -> bool:
11def is_cloud_environment() -> bool: 12 """ 13 Returns True if the connector is running in a cloud environment, False otherwise. 14 15 The function checks the value of the DEPLOYMENT_MODE environment variable which is set by the platform. 16 This function can be used to determine whether stricter security measures should be applied. 17 """ 18 deployment_mode = os.environ.get("DEPLOYMENT_MODE", "") 19 return deployment_mode.casefold() == CLOUD_DEPLOYMENT_MODE
Returns True if the connector is running in a cloud environment, False otherwise.
The function checks the value of the DEPLOYMENT_MODE environment variable which is set by the platform. This function can be used to determine whether stricter security measures should be applied.