envisage.service_offer module

An offer to provide a service.

class envisage.service_offer.ServiceOffer[source]

Bases: HasTraits

An offer to provide a service.

factory

A callable (or a string that can be used to import a callable) that is the factory that creates the actual service object.

e.g:

callable(**properties) -> Any

e.g. ‘foo.bar.baz.Baz’ is turned into ‘from foo.bar.baz import Baz’

properties

An optional set of properties to associate with the service offer.

This dictionary is passed as keyword arguments to the factory.

protocol

The protocol that the service provides.

This can be an actual class or interface, or a string that can be used to import a class or interface.

e.g. ‘foo.bar.baz.Baz’ is turned into ‘from foo.bar.baz import Baz’