dip.publish

The dip.publish module implements the infrastructure for publishing events about a model and for subscribing to those events.

IPublication

class dip.publish.IPublication

Base class: Interface

The IPublication interface defines the API to be implemented by a model that represents an event related to a published model.

event = Str()

The event related to the model. The following events are considered to be well known.

‘dip.events.opened’
occurs once just after the model has been opened or created.
‘dip.events.closed’
occurs once just before the model is closed.
‘dip.event.active’
occurs whenever the model becomes active.
‘dip.events.inactive’
occurs whenever the model becomes inactive.
model = Any()
The model being published.

IPublicationManager

class dip.publish.IPublicationManager

Base class: Interface

The IPublicationManager interface defines the API of a publication manager.

publishers = List(IPublisher)
The list of publishers.
subscribers = List(ISubscriber)
The list of subscribers.

IPublisher

class dip.publish.IPublisher

Base class: Interface

The IPublisher interface defines the API to be implemented by an object that publishes an event related to a model to other objects that implement the ISubscriber interface.

publication = Instance(IPublication)
The publication we have published.

ISubscriber

class dip.publish.ISubscriber

Base class: Interface

The ISubscriber interface defines the API to be implemented by an object that subscribes to the publication of events related to a model by other objects that implement the IPublisher interface.

subscription = Instance(IPublication)
The publication we have subscribed to.
subscription_type = Instance(type)
The type of model that the subscriber is interested in. If it is None then publications related to all types of model will be subscribed to.

Publication

class dip.publish.Publication

Base class: Model

The Publication class is the default implementation of the IPublication interface.

Table Of Contents

Previous topic

dip.plugins.default_plugin_manager

Next topic

dip.publish.default_publication_manager

This Page