pytilities.delegation.decorators

Various decorators to ease delegation

pytilities.delegation.decorators.in_profile(profile_name='default', modifiers='rwd')

Includes the decorated attribute in the specified profile.

Parameters:
  • profile_name (string) – name of the Profile to add the attribute to
  • modifiers (str combination of r:read, w:write, d:delete (order is not important, but each modifier may appear at most once).) – the kind of access to allow
pytilities.delegation.decorators.profile_carrier(cls=None)

Sets an attribute_profiles attribute on the class.

The attribute_profiles attribute is a dict with profiles generated from in_profile annotations found on class attributes. It has profile names of type str as key and the respective profile as value.

Previous topic

pytilities.delegation.decorators

Next topic

pytilities.descriptors

This Page