msticpy.common.exceptions module
Miscellaneous helper methods for Jupyter Notebooks.
- exception msticpy.common.exceptions.MsticpyAzureConfigError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserConfigError
Exception class for AzureData.
Create Azure data missing configuration exception.
- DEF_HELP_URI = ('Using the Azure API connector', 'https://msticpy.readthedocs.io/en/latest/data_acquisition/AzureData.html#instantiating-and-connecting-with-an-azure-data-connector')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyAzureConnectionError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for Azure Connection errors.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('Connecting to Microsoft Sentinel', 'https://msticpy.readthedocs.io/en/latest/data_acquisition/AzureData.html#instantiating-and-connecting-with-an-azure-data-connector')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyConfigException
Bases:
MsticpyException
Configuration exception class for msticpy.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyConnectionError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for KqlConnection errors.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('DataProviders', 'https://msticpy.readthedocs.io/en/latest/data_acquisition/DataProviders.html')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyDataQueryError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for data query errors.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('Query failed', 'https://msticpy.readthedocs.io/en/latest/DataAcquisition.html#querying-and-importing-data')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyException
Bases:
Exception
Default exception class for msticpy.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyImportExtraError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
,ImportError
Exception class for Imports that need an extra.
Create import missing extra exception.
- Parameters
- DEF_HELP_URI = ('Installing msticpy', 'https://msticpy.readthedocs.io/en/latest/getting_started/Installing.html')
- args
- msg
exception message
- name
module name
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- path
module path
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyKeyVaultConfigError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserConfigError
Key Vault configuration exception.
Create Key Vault configuration exception.
- DEF_HELP_URI = ('Using keyvault to store msticpy secrets', 'https://msticpy.readthedocs.io/en/latest/getting_started/msticpyconfig.html#specifying-secrets-as-key-vault-secrets')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyKeyVaultMissingSecretError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyKeyVaultConfigError
Missing secret exception.
Create Key Vault missing key exception.
- DEF_HELP_URI = ('Using keyvault to store msticpy secrets', 'https://msticpy.readthedocs.io/en/latest/getting_started/msticpyconfig.html#specifying-secrets-as-key-vault-secrets')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyKqlConnectionError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for KqlConnection errors.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('Connecting to Microsoft Sentinel', 'https://msticpy.readthedocs.io/en/latest/data_acquisition/DataProviders.html#connecting-to-an-azure-sentinel-workspace')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyNoDataSourceError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for missing data source errors.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('Querying and importing data', 'https://msticpy.readthedocs.io/en/latest/DataAcquisition.html#querying-and-importing-data')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyNotConnectedError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for NotConnected errors.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('Querying and importing data', 'https://msticpy.readthedocs.io/en/latest/DataAcquisition.html#querying-and-importing-data')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyParameterError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Exception class for missing/incorrect parameters.
Create parameter exception.
- Parameters
- DEF_HELP_URI = ('MSTICPy documentation', 'https://msticpy.readthedocs.io')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyResourceException
Bases:
MsticpyException
Exception class for resource errors.
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyUserConfigError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyUserError
Configuration user exception class for msticpy.
Create generic user configuration exception.
- DEF_HELP_URI = ('Configuring msticpy', 'https://msticpy.readthedocs.io/en/latest/getting_started/msticpyconfig.html')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception msticpy.common.exceptions.MsticpyUserError(*args, help_uri: Optional[Union[Tuple[str, str], str]] = None, **kwargs)
Bases:
MsticpyException
Msticpy User exception displaying friendly message.
Create an instance of the MsticpyUserError class.
- Parameters
args (Iterable of strings) – Args will be printed as text of the exception.
help_uri (Union[Tuple[str, str], str, None], optional) – Primary URL, by default “https://msticpy.readthedocs.org”
title (str, optional) – If a title keyword argument is supplied it will be used to create the title line.
*_uri (str, optional) – Additional keyword arguments who’s names end in “_uri” will be used to create a list of references in addition to the primary help_uri
display (bool, optional) – Display the exception when created. By default, True
Notes
The exception text is displayed when the exception is created and not when it is raised. We recommend creating the exception within the raise statement. E.g.
raise MsticpyUserException(arg1, arg2…)
Developer note: Any classes derived from MsticpyUserError should be named with an “Error” suffix to distinguish these from standard exception types.
- DEF_HELP_URI = ('msticpy documentation', 'https://msticpy.readthedocs.org')
- args
- classmethod no_display_exceptions()
Context manager to block exception display to IPython/stdout.
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.