49.2. OTHER INTERFACES
interface IIntrospectable
An introspectable object used for configuration introspection. In addition to the methods below, objects which implement this interface must also implement all the methods of Python’s collections.MutableMapping (the “dictionary interface”), and must be hashable.
register(introspector, action_info)
Register this IIntrospectable with an introspector. This method is invoked during action execution. Adds the introspectable and its relations to the introspector. introspector should be an object implementing IIntrospector. action_info should be a object implementing the interface pyramid.interfaces.IActionInfo representing the call that registered this introspectable. Pseudocode for an implementation of this method:
def register(self, introspector, action_info): self.action_info = action_info introspector.add(self)
for methodname, category_name, discriminator in self._relations: method = getattr(introspector, methodname) method((i.category_name, i.discriminator),
(category_name, discriminator))
discriminator_hash
an integer hash of the discriminator
title
Text title describing this introspectable
relate(category_name, discriminator)
Indicate an intent to relate this IIntrospectable with another IIntrospectable (the one associated with the category_name and discriminator) during action execution.
type_name
Text type name describing this introspectable
unrelate(category_name, discriminator)
Indicate an intent to break the relationship between this IIntrospectable with another IIntrospectable (the one associated with the category_name and discriminator) during action execution.