|
Imported modules
|
|
from __future__ import generators
from _once import BaseDescriptor
from interfaces import *
from once import *
from peak.api import *
from peak.config.interfaces import IConfigKey, IPropertyMap, IConfigurationRoot, NullConfigRoot
from peak.config.registries import ImmutableConfig
from peak.naming.names import toName, AbstractName, COMPOUND_KIND, IName
from peak.naming.syntax import PathSyntax
from peak.util.EigenData import AlreadyRead
from peak.util.imports import importString
from types import ModuleType
|
|
Functions
|
|
|
|
|
|
Acquire
|
Acquire ( key, **kw )
DEPRECATED: use Obtain(key, offerAs=[key])
|
|
|
Constant
|
Constant ( value, **kw )
DEPRECATED: Use Make(lambda: value) instead
|
|
|
acquireComponent
|
acquireComponent ( component, name )
Acquire name relative to component, w/fallback to naming.lookup()
name is looked for as an attribute of component. If not found,
the component's parent will be searched, and so on until the root component
is reached. If name is still not found, and the root component
implements config.IConfigurationRoot, the name will be looked up in the
default naming context, if any. Otherwise, a NameNotFound error will be
raised.
|
|
|
bindSequence
|
bindSequence ( *targetNames, *kw )
DEPRECATED: use binding.Obtain([key1,key2,...])
|
|
|
bindToParent
|
bindToParent ( level=1, **kw )
DEPRECATED: use binding.Obtain(..)
|
|
|
bindToProperty
|
bindToProperty (
propName,
default=NOT_GIVEN,
**kw,
)
DEPRECATED: use binding.Obtain(PropertyName(propName))
|
|
|
bindToSelf
|
bindToSelf ( **kw )
DEPRECATED: use binding.Obtain(.)
|
|
|
bindToUtilities
|
bindToUtilities ( iface, **kw )
DEPRECATED: bind list of all iface utilities above the component
|
|
|
getComponentName
|
getComponentName ( component )
Return name of component, or None if root or non-component
|
|
|
getComponentPath
|
getComponentPath ( component, relativeTo=None )
Get ComponentName that would traverse from relativeTo to component
If relativeTo is None or not supplied, the path returned is relative
to the root component of component. Note that if supplied, relativeTo
must be an ancestor (parent, parent's parent, etc.) of component.
|
|
|
getParentComponent
|
getParentComponent ( component )
Return parent of component, or None if root or non-component
|
|
|
getRootComponent
|
getRootComponent ( component )
Return the root component of the tree component belongs to
|
|
|
lookupComponent
|
lookupComponent (
component,
name,
default=NOT_GIVEN,
adaptTo=None,
creationName=None,
suggestParent=True,
)
Lookup name as a component key relative to component
name can be any object that implements or is adaptable to IComponentKey.
Such objects include peak.naming names, interface objects, property
names, and any custom objects you may create that implement IComponentKey.
Strings will be converted to a URL, or to a ComponentName if they have
no URL prefix. If the key cannot be found, an exceptions.NameNotFound
error will be raised unless a default other than NOT_GIVEN is provided.
|
|
|
notifyUponAssembly
|
notifyUponAssembly ( parent, child )
Call child.uponAssembly() as soon as parent knows all its parents
|
|
|
whenAssembled
|
whenAssembled ( func, **kw )
DEPRECATED: use Make(func, uponAssembly=True)
|
|
Classes
|
|
Component |
Thing that can be composed into a component tree, w/binding & lookups
|
ComponentName |
Path between components
|
ConfigFinder |
Look up utilities or properties
|
Delegate |
Delegate attribute to the same attribute of another object
|
ModuleAsNode | |
Obtain |
Obtain(componentKey,[default=value])' - finds/caches a needed component
|
PluginKeys |
Component key that finds the keys of plugins matching a given key
|
PluginsFor |
Component key that finds plugins matching a configuration key
|
Require |
Placeholder for a binding that should be (re)defined by a subclass
|
SequenceFinder |
Look up sequences of component keys
|
_Base |
Basic attribute management and "active class" support
|
_proxy | |
|