msticpy.config.mp_config_file module

Msticpy Config class.

class msticpy.config.mp_config_file.MpConfigFile(file: Optional[Union[str, Path]] = None, settings: Optional[Dict[str, Any]] = None)

Bases: CompEditStatusMixin, CompEditDisplayMixin

MSTICPy Configuration management class.

Use the functions from the commandline or display in a Jupyter notebook to use interactive version.

Create an instance of the MSTICPy Configuration helper class.

Parameters
  • file (Optional[str], optional) – config file to load, by default None

  • settings (Optional[Dict[str, Any]], optional) – setting dict to load, by default None

static border_layout(width='95%')

Return border widget layout.

browse_for_file(show: bool = True)

Open the browser to browser/search fr a file.

clear_status()

Clear the status text.

property current_file

Return currently loaded file path.

static get_workspace_from_url(url: str) Dict[str, Dict[str, str]]

Return workspace settings from Sentinel portal URL.

Parameters

url (str) – The URL of the Azure portal page for the Sentinel workspace.

Returns

Dictionary with a single element keyed by workspace name The value is the workspace settings dictionary for the workspace.

Return type

Dict[str, Dict[str, str]]

load_default()

Load default settings specified by MSTICPYCONFIG env var.

load_from_file(file: Union[str, Path])

Load settings from file.

map_json_to_mp_ws()

Map config.json settings to MSTICPy settings.

static no_border_layout(width='95%')

Return no-border widget layout.

static refresh_mp_config()

Refresh global MSTICPy settings from config file.

save_to_file(file: str, backup: bool = True)

Save current configuration to file.

Parameters
  • file (str) – The file path to save to.

  • backup (bool, optional) – Create a backup file, if overwriting existing file, by default True

set_status(status, timeout: float = 3.0)

Set the status text.

show_kv_secrets(show: bool = True)

Show secrets from currently configured Key Vault.

testing = False
validate_settings(show: bool = True)

Run the validator against currently loaded settings.

view_settings(show: bool = True)

View the current settings as text.