Package kenozooid :: Module component

Module component

source code

Simple component interface injection and component repository querying mechanism.
Functions
 
ichain(...)
chain.from_iterable(iterable) --> chain object
source code
 
inject(iface, **params)
Class decorator to declare interface implementation.
source code
 
query(iface=None, **params)
Look for class implementing specified interface.
source code
 
params(cls)
Get interface injection parameters for component realized with specified class.
source code
Variables
  log = logging.getLogger('kenozooid.component')
  __package__ = 'kenozooid'
Function Details

ichain(...)

source code 

chain.from_iterable(iterable) --> chain object

Alternate chain() constructor taking a single iterable argument that evaluates lazily.

inject(iface, **params)

source code 

Class decorator to declare interface implementation.

Injection parameters can be used to query for classes implementing an interface and having appropriate values.

Parameters:
  • iface - Interface to inject.
  • params - Injection parameters.

params(cls)

source code 
Get interface injection parameters for component realized with specified class.
Parameters:
  • cls - Class realizing component.