class glue.core.message.Message(sender, tag=None)[source]#

Bases: object

Base class for messages that the hub handles.

Each message represents a specific kind of event. After clients register to a hub, the subscribe to specific message classes, and will only receive those kinds of messages.

The message class family is hierarchical, and a client subscribing to a message class implicitly subscribes to all of its subclasses.

Attr sender:

The object which sent the message

Attr tag:

An optional string describing the message

Create a new message

  • sender – The object sending the message

  • tag – An optional string describing the message