service
dev_tool.services.portal.environment.service
log = logging.getLogger(__name__)
module-attribute
EnvironmentService
Bases: BaseService
A service class for managing portal environment operations.
This class provides methods for downloading environment variables, parsing environment data, and saving environment files.
The constructor for the EnvironmentService class.
Parameters:
-
config(PortalServiceConfig) –The portal service configuration.
-
client(APIClientService) –The API client service for making requests.
Source code in dev_tool/services/portal/environment/service.py
config = config
instance-attribute
client = client
instance-attribute
task_manager = TaskManager()
instance-attribute
download_environment_variables
get_environment_variables
A method that downloads environment variables as a background task.
Parameters:
-
name(str) –The name of the environment to download.
Returns:
-
str–The task ID for tracking the download progress.
Source code in dev_tool/services/portal/environment/service.py
parse_environment_values
A method that parses environment variable values from a string.
Parameters:
-
values(str) –The environment values string with newline-separated key=value pairs.
Returns:
Source code in dev_tool/services/portal/environment/service.py
set_environment_variables
A method that saves environment variables to a file.
Parameters:
-
values(str) –The environment values string to save.