is_notebook

is_notebook() bool

Check if we’re in an interactive context (Notebook, GUI support) or terminal-based.

Returns
bool

True if we are in a notebook context, False otherwise