class documentation

class msiempy.core.types.NitroDict(collections.UserDict, NitroObject): (source)

Known subclasses: msiempy.Alarm, msiempy.DataSource, msiempy.Event, msiempy.Watchlist

View In Hierarchy

Dict-Like object (Base class) to represent SIEM data. Exemple : Event, Alarm, etc...

This classe and subclasses fully implements dict interface and is suitable for dictionnary operations, see: https://docs.python.org/3/library/stdtypes.html#mapping-types-dict

Instance Variable data Underlying dict object
Method __init__ Create a new dict item
Method __str__ str(obj) -> return text string.
Method __repr__ repr(obj) -> return json string.
Method json JSON representation of a item
Method text Text list of item's values
Method data_from_id This method retreive the item infos from an object ID. Abstract declaration.
Method get_id Return the object ID. Abstract definition.

Inherited from NitroObject:

Class NitroJSONEncoder Custom JSON encoder that will use the approprtiate propertie depending of the type of NitroObject. TODO support json json dumping of QueryFilers, may be by making them inherits from NitroDict.
Instance Variable nitro msiempy.core.session.NitroSession object. Interface to the SIEM.
Method refresh Re-load the object. Abstract declaration.
data = (source)
Underlying dict object
def __init__(self, adict=None, id=None): (source)

Create a new dict item

Arguments:
  • adict: dict object to wrap., typically received from the SIEM.
  • id: ESM obejct unique identifier. Alert.IPSIDAlertID for exemple. Load the data from the SIEM.
Note:
NitroDict is an abstract class and cannot be instanciated as is.
def __str__(self): (source)
str(obj) -> return text string.
def __repr__(self): (source)
repr(obj) -> return json string.
@property
def json(self): (source)
JSON representation of a item
@property
def text(self): (source)
Text list of item's values
@abc.abstractmethod
def data_from_id(id): (source)
This method retreive the item infos from an object ID. Abstract declaration.
@abc.abstractmethod
def get_id(self): (source)
Return the object ID. Abstract definition.
API Documentation for msiempy, generated by pydoctor 20.7.1 at 2020-11-18 14:02:21.