Model

class src.mvc.model.AbstractModel

A model is a container for the current state of an entity. All models in Salt should erive from AbstractModel and should remain “dumb”, i.e. they should be pure data management interfaces.

Further, a model should not have knowledge about whether or not the programme is running in headless mode.

deserialize()
register_event_handler(event: str, handler: Callable)

Register an event handler for an event with the name event

remove_event_handler(event: str, handler: Callable)
serialize()
class src.mvc.model.AbstractModelEvent(*args)

Events fired by models should extend this class and set the class attribute _name

property args
property name