Title: | Manage Environment Variables |
---|---|
Description: | Get or Set Environment Variables using .Renviron configuration file. |
Authors: | Flippie Coetser [aut, cre] |
Maintainer: | Flippie Coetser <[email protected]> |
License: | file LICENSE |
Version: | 0.0.1.004 |
Built: | 2025-02-11 04:42:16 UTC |
Source: | https://github.com/FlippieCoetser/Environment |
Provides a suite of utility functions for managing environment variables in the .Renviron
file.
This includes initialization, retrieval, caching, and clearing of environment variables, enhancing secure management of sensitive data.
Configurator()
Configurator()
The Configurator function initializes and provides access to the following utility functions:
A list of utility functions that facilitate direct interactions with environment variables, structured as follows:
open.config.file
Opens or creates the .Renviron
file, enabling the user to manage environment variables.
get.env.variable
Retrieves the value of an environment variable by its key.
cache.env.variable
Temporarily stores an environment variable value during the current R session.
clear.env.variable
Removes a cached environment variable from the current session.
# Initialize the configurator configurator <- Environment::Configurator() # Define the environment variable name and value variable.name <- 'API_KEY' variable.value <- '123456789' #' # Set an environment variable for example purposes Sys.setenv(API_KEY = variable.value) # Retrieve an environment variable variable.name |> configurator[['get.env.variable']]() # Cache an environment variable variable.name |> configurator[['cache.env.variable']](variable.value) # Clear a cached environment variable variable.name |> configurator[['clear.env.variable']]()
# Initialize the configurator configurator <- Environment::Configurator() # Define the environment variable name and value variable.name <- 'API_KEY' variable.value <- '123456789' #' # Set an environment variable for example purposes Sys.setenv(API_KEY = variable.value) # Retrieve an environment variable variable.name |> configurator[['get.env.variable']]() # Cache an environment variable variable.name |> configurator[['cache.env.variable']](variable.value) # Clear a cached environment variable variable.name |> configurator[['clear.env.variable']]()
Provides a suite of utility functions for managing environment variables in the .Renviron
file.
This includes initialization, retrieval, caching, and clearing of environment variables, enhancing secure management of sensitive data.
Environment.Orchestrator()
Environment.Orchestrator()
The Environment.Orchestrator function initializes and provides access to the following utility functions:
A list of utility functions that facilitate direct interactions with environment variables, structured as follows:
open.config.file
Opens or creates the .Renviron
file, enabling the user to manage environment variables.
get.env.variable
Retrieves the value of an environment variable by its key.
cache.env.variable
Temporarily stores an environment variable value during the current R session.
clear.env.variable
Removes a cached environment variable from the current session.