Skip to main content

Environment Variables

Sessions come with a couple environment variables available for community use. These variables can be accessed in:

  • Jupyter Notebook via %ENV VAR
    %ENV GRID_SESSION_NAME
  • Python via os.getenv
    import os
    os.getenv('GRID_SESSION_NAME')
  • Terminal
    echo $GRID_SESSION_NAME

Environment Variables List​

Environment VariableDescription
GRID_URLThe Grid url. Default is https://platform.grid.ai:443
GRID_SESSION_IDThe Session's ID
GRID_SESSION_NAMEThe Session's name
GRID_API_KEYThe grid login --key value
GRID_USER_IDThe grid login --username value
GRID_CONTEXT_CLUSTER_IDThe grid user set-cluster-context value
GRID_GIT_DOMAINThe domain. Default is github.com
GRID_GIT_EMAILThe GITHUB email
GRID_GIT_PASSWORDThe GITHUB Password
GRID_GIT_USERNAMEThe GITHUB Username