49.2. OTHER INTERFACES
get_category(category_name, default=None, sort_key=None)
Get a sequence of dictionaries in the form
[{’introspectable’:IIntrospectable, ’related’:[sequence of related IIntrospectables]},
...] where each introspectable is part of the category associated with category_name .
If the category named category_name does not exist in the introspector the value passed as default will be returned.
If sort_key is None, the sequence will be returned in the order the introspectables were added to the introspector. Otherwise, sort_key should be a function that accepts an IIntrospectable and returns a value from it (ala the key function of Python’s sorted callable).
unrelate(*pairs)
Given any number of of (category_name, discriminator) pairs passed as positional arguments, unrelate the associated introspectables from each other. The introspectable related to each pair must have already been added via .add or .add_intr; a KeyError will result if this is not true. An error will not be raised if any pair is not already related to another.
This method is not typically called directly, instead it’s called indirectly by pyramid.interfaces.IIntrospector.register()
remove(category_name, discriminator)
Remove the IIntrospectable related to category_name and discriminator from the introspector, and fix up any relations that the introspectable participates in. This method will not raise an error if an introspectable related to the category name and discriminator does not exist.
add(intr)
Add the IIntrospectable intr (use instead of pyramid.interfaces.IIntrospector.add() when you have a custom IIntrospectable). Replaces any existing introspectable registered using the same category/discriminator.
This method is not typically called directly, instead it’s called indirectly by pyramid.interfaces.IIntrospector.register()
related(intr)
Return a sequence of IIntrospectables related to the IIntrospectable intr. Return the empty sequence if no relations for exist.