Package application :: Module schema :: Class Cloud
[hide private]
[frames] | no frames]

Class Cloud

source code

Represent a cloud as a set of endpoints grouped by policy

The constructor takes zero or more "by value" endpoints, attributes, or attribute names, and keyword arguments to create policy groups. For example:
   class anItem(OtherItem):
       foo = schema.One(schema.Text)
       bar = schema.Sequence(Something)

       schema.addClouds(
           sharing = schema.Cloud(
               foo, "displayName",
               byCloud = [bar, OtherItem.someAttr],
           )
       )
This creates a 'sharing' cloud that includes the ``foo`` and ``displayName`` attributes by value, and the ``bar`` and ``someAttr`` attributes by cloud. Each keyword argument name must be a valid ``//Schema/Core/IncludePolicy`` value, and the keyword argument value must be a list or tuple of Endpoint objects, attribute objects, or attribute names.

Instance Methods [hide private]
 
__init__(self, *byValue, **groups) source code
 
make_cloud(self, kind, alias) source code