msticpy.nbwidgets.get_environment_key module
Module for pre-defined widget layouts.
- class msticpy.nbwidgets.get_environment_key.GetEnvironmentKey(env_var: str, help_str: str | None = None, description: str = 'Enter the value: ', auto_display: bool = False, **kwargs)
Bases:
RegisteredWidget
,IPyDisplayMixin
GetEnvironmentKey.
Tries to retrieve an environment variable value. The value can be changed/set and optionally saved back to the system environment.
Create a new instance of GetEnvironmentKey.
- Parameters:
env_var (str) – Name of the environment variable.
help_str (str, optional) – Help to display if the environment variable is not set. (the default is None)
description (str, optional) – Prompt to display with the text box. (the default is “Enter the value: “) “prompt” is a alias for this parameter
auto_display (bool, optional) – Whether to display on instantiation (the default is False)
- ALLOWED_KWARGS = ['id_vals', 'val_attrs', 'nb_params', 'name_space', 'register']
- display()
Display the interactive widgets.
- property layout
Return underlying widget collection.
- property name
Get the current name of the key.
- property value
Get the current value of the key.