| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
TypeReference Reference a core schema type (e.g. |
|||
|
ActiveDescriptor Abstract base for descriptors needing activation by their classes |
|||
|
Activator Metaclass that activates contained ``ActiveDescriptor`` instances |
|||
|
Descriptor Descriptor for a schema-defined attribute |
|||
| One | |||
| Many | |||
| Sequence | |||
| Mapping | |||
| Calculated | |||
|
Endpoint Represent an endpoint |
|||
|
AttributeAsEndpoint Adapt a Descriptor or attribute name to use as an Endpoint factory |
|||
|
Cloud Represent a cloud as a set of endpoints grouped by policy |
|||
|
__setup__ List subclass that makes a better error message when you try to call __setup__ directly. |
|||
|
ItemClass Metaclass for schema.Item |
|||
|
CollectionClass The metaclass to use for declaring collection classes |
|||
|
ItemRoot Schema template for a named root |
|||
|
Item Base class for schema-defined Kinds |
|||
|
AnnotationItem Persistent data for Annotation types |
|||
| Comparator | |||
|
AnnotationClass Metaclass for annotation types |
|||
|
Annotation Base class for annotations |
|||
|
TypeClass Metaclass for type types |
|||
|
StructClass Metaclass for struct types |
|||
| SchemaStruct | |||
| Struct | |||
| SchemaEnumValue | |||
|
EnumerationClass Metaclass for enumerations |
|||
|
Enumeration Base class for defining enumerations |
|||
|
ns Shortcut namespace for referring to classes and instances in a parcel |
|||
| ModuleMaker | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
all_aspects =
|
|||
policy_values =
|
|||
default_schema =
|
|||
core_types =
|
|||
Anything = TypeReference('//Schema/Core/Anything')
|
|||
Boolean = TypeReference('//Schema/Core/Boolean')
|
|||
Bytes = TypeReference('//Schema/Core/Bytes')
|
|||
Class = TypeReference('//Schema/Core/Class')
|
|||
Complex = TypeReference('//Schema/Core/Complex')
|
|||
Date = TypeReference('//Schema/Core/Date')
|
|||
DateTime = TypeReference('//Schema/Core/DateTime')
|
|||
DateTimeTZ = TypeReference('//Schema/Core/DateTimeTZ')
|
|||
Decimal = TypeReference('//Schema/Core/Decimal')
|
|||
Dictionary = TypeReference('//Schema/Core/Dictionary')
|
|||
Float = TypeReference('//Schema/Core/Float')
|
|||
Importable = TypeReference('//Schema/Core/Importable')
|
|||
Integer = TypeReference('//Schema/Core/Integer')
|
|||
ItemRef = TypeReference('//Schema/Core/ItemRef')
|
|||
List = TypeReference('//Schema/Core/List')
|
|||
Lob = TypeReference('//Schema/Core/Lob')
|
|||
Long = TypeReference('//Schema/Core/Long')
|
|||
NilValue = TypeReference('//Schema/Core/NilValue')
|
|||
Path = TypeReference('//Schema/Core/Path')
|
|||
Set = TypeReference('//Schema/Core/Set')
|
|||
Symbol = TypeReference('//Schema/Core/Symbol')
|
|||
Text = TypeReference('//Schema/Core/Text')
|
|||
Time = TypeReference('//Schema/Core/Time')
|
|||
TimeDelta = TypeReference('//Schema/Core/TimeDelta')
|
|||
TimeZone = TypeReference('//Schema/Core/TimeZone')
|
|||
Tuple = TypeReference('//Schema/Core/Tuple')
|
|||
URL = TypeReference('//Schema/Core/URL')
|
|||
UUID = TypeReference('//Schema/Core/UUID')
|
|||
__warningregistry__ =
|
|||
name =
|
|||
|
|||
Declare metadata for a class' schema item The attributes defined by the keyword arguments will be set on the enclosing class' schema Item. For example, the following class' repository Kind will have a ``displayAttribute`` of ``"someAttr"``:
class SomeItem(schema.Item):
schema.kindInfo(
displayAttribute = "someAttr",
)
``kindInfo()`` can only be used in the body of a class that derives from ``schema.Item`` or ``schema.Enumeration``, and it will only accept keywords that are valid attributes of the ``Kind`` or ``Enumeration`` kinds, respectively. (Note: if your class includes a ``__metaclass__`` definition, any calls to ``kindInfo`` must come *after* the ``__metaclass__`` assignment.) |
Declare computed initial values for a class' attributes Takes keyword arguments whose names are the attribute names, and whose values are 1-argument callables taking an item and returning the value the attribute should have. For example:
class anItem(OtherItem):
timestamp = schema.One(schema.DateTime)
schema.initialValues(
timestamp = lambda self: datetime.now(),
)
|
Declare clouds for a class' Kind Takes keyword arguments whose names define the clouds' aliases, and whose values are the ``schema.Cloud`` instances. For example:
class anItem(OtherItem):
foo = schema.One(schema.Text)
bar = schema.Sequence(Something)
schema.addClouds(
sharing = schema.Cloud(foo, "displayName"),
copying = schema.Cloud(byCloud = [bar]),
)
|
Import an item specified by a string Example Usage:
attribute1 = importString('some.module:attribute1')
attribute2 = importString('other.module:nested.attribute2')
'importString' imports an object from a module, according to an import specification string: a dot-delimited path to an object in the Python package namespace. For example, the string '"some.module.attribute"' is equivalent to the result of 'from some.module import attribute'. For readability of import strings, it's sometimes helpful to use a ':' to separate a module name from items it contains. It's optional, though, as 'importString' will convert the ':' to a '.' internally anyway. This routine was copied from PEAK's ``peak.util.imports`` module. |
Get child `name` of `parent`, creating a new kindless item if needed If the item didn't exist or is a forward reference, the caller is logged as the source of the forward reference so that ``assertResolved()`` can identify the source of the broken reference if it remains unresolved. Forward references can be marked resolved using ``resolveRef()``. |
Mark the forward reference to (parent,name) resolved Normally, this is called by the ItemClass.update() method. |
Assert that all forward references in `view` have been resolved If any forward references have not been resolved, raise an error listing them. |
Return the Parcel for the named module If the named module has a ``__parcel__`` attribute, its value will be used to redirect to another parcel. If the module does not have a ``__parcel__``, then a new parcel will be created, cached, and returned. This routine is thread-safe and re-entrant. |
|
|||
all_aspects
|
policy_values
|
default_schema
|
core_types
|
__warningregistry__
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Oct 28 06:06:59 2007 | http://epydoc.sourceforge.net |