tardis.util.environment module

class tardis.util.environment.Environment(*values)[source]

Bases: StrEnum

JUPYTER = 'jupyter'
SSH_JH = 'ssh_jh'
TERMINAL = 'terminal'
VSCODE = 'vscode'
classmethod get_current_environment() Environment[source]

Get the current execution environment.

Returns:
Environment

The current environment enum member.

static is_notebook() bool[source]

Checking the shell environment where the simulation is run is Jupyter based

Returns:
Trueif the shell environment is Jupyter Based
Falseif the shell environment is Terminal or anything else
static is_sshjh() bool[source]

Checking if the current environment is JupyterHub

Returns:
Trueif running in notebook with JupyterHub environment variables
Falseotherwise
static is_terminal() bool[source]

Checking if the current environment is a terminal.

static is_vscode() bool[source]

Checking if the current environment is VSCode