guillotina.component¶
-
guillotina.component.get_adapter(object, interface=<InterfaceClass zope.interface.Interface>, name='', context=None, args=[], kwargs={})¶ Get a registered adapter
Parameters: - object – Object to get adapter for
- interface – What interface should the adapter provide
- name – if it is a named adapter
- args – args to provide the adapter constructor
- kwargs – kwargs to provide the adapter constructor
Raises: ComponentLookupError –
-
guillotina.component.get_adapters(objects, provided, context=None)¶ Get a registered adapter
Parameters: - objects – Tuple of objects
- provided – What interface should the adapter provide
-
guillotina.component.get_multi_adapter(objects, interface=<InterfaceClass zope.interface.Interface>, name='', context=None, args=[], kwargs={})¶ Get a registered multi adapter
Parameters: - objects – Objects to get adapter for
- interface – What interface should the adapter provide
- name – if it is a named adapter
- args – args to provide the adapter constructor
- kwargs – kwargs to provide the adapter constructor
Raises: ComponentLookupError –
-
guillotina.component.query_adapter(object, interface=<InterfaceClass zope.interface.Interface>, name='', default=None, context=None, args=[], kwargs={})¶ Get a registered adapter
Parameters: - object – Object to get adapter for
- interface – What interface should the adapter provide
- name – if it is a named adapter
- args – args to provide the adapter constructor
- kwargs – kwargs to provide the adapter constructor
-
guillotina.component.query_multi_adapter(objects, interface=<InterfaceClass zope.interface.Interface>, name='', default=None, context=None, args=[], kwargs={})¶ Get a registered multi adapter
Parameters: - objects – Objects to get adapter for
- interface – What interface should the adapter provide
- name – if it is a named adapter
- args – args to provide the adapter constructor
- kwargs – kwargs to provide the adapter constructor
-
guillotina.component.get_utility(interface, name='', context=None)¶ Get a registered utility
Parameters: - interface – What interface should the utility provide
- name – if it is a named adapter
Raises: ComponentLookupError –
-
guillotina.component.query_utility(interface, name='', default=None, context=None)¶ Get a registered utility
Parameters: - interface – What interface should the utility provide
- name – if it is a named adapter
-
guillotina.component.get_all_utilities_registered_for(interface, context=None)¶ Get all utilities registered for interface
Parameters: interface – What interface should the utility provide
-
guillotina.component.get_utilities_for(interface, context=None)¶ Get utilities registered for interface
Parameters: interface – What interface should the utility provide