Accessing Environmental Variables from Projects
This topic shows you how to access environmental variables from your code.
Environmental variables are injected into every engine launched for a project, contingent on the scope at which the variable was set (global, project, etc.). The following code samples show how to access a sample environment variable called DATABASE_PASSWORD from your project code.
database.password <- Sys.getenv("DATABASE_PASSWORD")
import os database_password = os.environ["DATABASE_PASSWORD"]